Flipping an Image

LeetCode題目: 832. Flipping an Image My solution: /** * @param {number[][]} image * @return {number[][]} */ let flipAndInvertImage = image => image.map...

Goat Latin

LeetCode題目: 824. Goat Latin My solution: /** * @param {string} sentence * @return {string} */ let toGoatLatin = sentence => { const vowel = [&#x2...

Most Common Word

LeetCode題目: 819. Most Common Word My solution: /** * @param {string} paragraph * @param {string[]} banned * @return {string} */ let mostCommonWord = (p...

Number of Lines To Write String

LeetCode題目: 806. Number of Lines To Write String My solution: /** * @param {number[]} widths * @param {string} s * @return {number[]} */ let numberOfLi...

Unique Morse Code Words

LeetCode題目: 804. Unique Morse Code Words My solution: /** * @param {string[]} words * @return {number} */ let uniqueMorseRepresentations = words => {...