728x90
[Javascript] LeetCode 557. Reverse Words in a String III
💡 구글에 Javascript 풀이가 많이 없거나, 배운 점이 있으면 포스팅합니다.
내 풀이
/**
* @param {string} s
* @return {string}
*/
var reverseWords = (s) => s.split(' ').map((x) => x.split('').reverse().join('')).join(' ');
- 자스 너무 사기템 이잖아~~
'Coding Test > LeetCode' 카테고리의 다른 글
[Javascript] (LeetCode)121. Best time to buy and sell stock (Easy) (0) | 2022.07.21 |
---|---|
[Javascript] (LeetCode) 26. Remove Duplicates from Sorted Array (Easy) (0) | 2022.07.20 |
[Javascript] (LeetCode) 19. Remove Nth Node From End of List (Medium) (0) | 2022.07.14 |
[Javascript] LeetCode 876. Middle of the Linked List (0) | 2022.07.14 |
[Javascript] LeetCode 344. Reverse String (0) | 2022.07.13 |
[Javascript] LeetCode 167. Two Sum II - Input Array Is Sorted (0) | 2022.07.13 |
오름차순 (Ascending order) vs 비 내림차순(non-decreasing order) (0) | 2022.07.13 |
[Javascript] LeetCode 283. Move Zeroes (0) | 2022.07.13 |
댓글