LeetCode題目: 345. Reverse Vowels of a String My solution: /** * @param {string} s * @return {string} */ let reverseVowels = s => { if(s.length <...
LeetCode題目: 605. Can Place Flowers My solution: /** * @param {number[]} flowerbed * @param {number} n * @return {boolean} */ let canPlaceFlowers = (flo...
LeetCode題目: 1431. Kids With the Greatest Number of Candies My solution: /** * @param {number[]} candies * @param {number} extraCandies * @return {boolea...
LeetCode題目: 1768. Merge Strings Alternately My solution: /** * @param {string} word1 * @param {string} word2 * @return {string} */ let mergeAlternately...
事件循環(Event Loop) 參考出處: https://www.explainthis.io/zh-hant/swe/what-is-event-loop 堆疊(Stack): 後進先出(Last In First Out, LIFO) 佇列(Queue): 先進先出(First In First...