[LeetCode] Two Sum
2021.08.31
https://leetcode.com/problems/two-sum/submissions/ 숫자를 가진 배열 nums와 숫자값인 target이 있다.이 때, 배열 nums 안에서 두 개의 숫자를 더해서 target이 되도록 구현하는 문제. /*@param {number[]} nums@param {number} target@return {number[]}*/var twoSum = function(nums, target){ let x = nums.length; for(let i=0; i * i test input -> nums = [2,7,11,15] , target = 9배열의 길이 nums.length를 x라고 해 주었다.(1) i // 즉, i (2) i // 즉, i그리고 j = i+1이므..