[LeetCode/Typescript] 1. Two Sum 정답
·
Algorithm/LeetCode
문제 https://leetcode.com/problems/two-sum/ Two Sum - 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 정답 function twoSum(nums: number[], target: number): number[] { const result = []; for(let i = 0; i < nums.length; i++) { for(let j = i + 1; j < nums.length; j++) { const sum = nums[i..