리트코드 (55) 썸네일형 리스트형 [리트코드] 345. Reverse Vowels of a String - js 1. 문제 https://leetcode.com/problems/reverse-vowels-of-a-string/ Reverse Vowels of a String - LeetCode Can you solve this real interview question? Reverse Vowels of a String - Given a string s, reverse only all the vowels in the string and return it. The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lower and upper cases, more than onc leetcode.com 2. 코드 이 문제는 투 포인터를 사용해야하는 .. [리트코드] 215. Kth Largest Element in an Array 1. 문제 https://leetcode.com/problems/kth-largest-element-in-an-array/ 2. 코드 /** * @param {number[]} nums * @param {number} k * @return {number} */ var findKthLargest = function(nums, k) { let sortedNums = nums.sort((a,b) => b-a); return sortedNums[k-1]; }; [리트코드] 49. Group Anagrams - js 1. 문제 https://leetcode.com/problems/group-anagrams/description/ Group Anagrams - LeetCode Can you solve this real interview question? Group Anagrams - Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase leetcode.com 2. 코드 같은 알파벳 조합으로 이루어진 단어들을 배열로 묶어 리턴하.. [리트코드] 39. Combination Sum - js 1. 문제 https://leetcode.com/problems/combination-sum/ Combination Sum - LeetCode Can you solve this real interview question? Combination Sum - Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the comb leetcode.com 2. 코드 /** * @param {number[]} candidates * @para.. [리트코드] 230. Kth Smallest Element in a BST - js 1. 문제 https://leetcode.com/problems/kth-smallest-element-in-a-bst/submissions/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 코드 /** * Definition for a binary tree node. * function TreeNode(val, left, right) { * this.va.. [리트코드] 136. Single Number - js 1. 문제 https://leetcode.com/problems/single-number/submissions/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2. 코드 /** * @param {number[]} nums * @return {number} */ var singleNumber = function(nums) { let map = new Map().. [리트코드] 118. Pascal's Triangle - js 1. 문제 https://leetcode.com/problems/pascals-triangle/ Pascal's Triangle - LeetCode Can you solve this real interview question? Pascal's Triangle - Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: [https://upload.wikimedia.o leetcode.com 2. 코드 /** * @param {number} numRows * @return.. [리트코드] 48. Rotate Image - js 1. 문제 https://leetcode.com/problems/rotate-image/description/ Rotate Image - LeetCode Can you solve this real interview question? Rotate Image - You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place [https://en.wikipedia.org/wiki/In-place_algorithm], which m leetcode.com 2. 코드 이 문제는 다른 문제들과 달리 새로운 matrix를 선언하여 re.. 이전 1 ··· 3 4 5 6 7 다음