Notice
Recent Posts
Recent Comments
Link
목록전체 글 (31)
코딩 공부

[LeetCode] [Easy] 1. Two Sum 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 주어진 배열안에 두 수의 합이 target 값이 나오는 index 구하기 1. Map을 이용하여 를 함께 저장한다. 2. for loop을 돌면서 target - nums[index]이 있는 곳을 찾으면 끝. 마지막 리턴은 딱히 할게 없어서 null을 써줬어요.
Coding
2020. 10. 10. 07:50