[LeetCode] 15. 3Sum 풀이 (JS)
0. 문제 https://leetcode.com/problems/3sum/ 3Sum - LeetCode 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 숫자로 이루어진 배열이 주어 질 때, 합이 0이 되는 세개의 원소를 배열로 리턴 #1 Input: nums = [-1,0,1,2,-1,-4] Output: [[-1,-1,2],[-1,0,1]] Explanation: nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0. nums[1] + nums[2..
2022. 7. 24.
[LeetCode] 88. Merge Sorted Array 풀이 (JS)
0. 문제 https://leetcode.com/problems/merge-sorted-array/ Merge Sorted Array - LeetCode 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 정렬된 두개의 배열을 합쳐서 하나의 정렬된 배열을 만드는 문제 #1 Input: nums1 = [1,2,3,0,0,0], m = 3, nums2 = [2,5,6], n = 3 Output: [1,2,2,3,5,6] Explanation: The arrays we are mergin..
2022. 7. 24.