Algorithm/leetcode(python)5 [leetcode] 1. Two Sum 1. 문제분석 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 내가 생각한 포인트 - for문 - One solution -> 즉 답을 찾는순간 loop를 나가면된다. - no same element twice -> 두번째 루프는 i+1부터 시작해야겠다. 2. 풀이 class Solution: def twoSum(self, nums: List[int], target: int) .. 2020. 7. 1. 이전 1 2 다음