leetcode 11 [LeetCode] 1. Two Sum I. Description문제 링크: https://leetcode.com/problems/two-sum/description/?envType=problem-list-v2&envId=hash-table&II. Codei)class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: for i in range(0, len(nums)-1): for j in range(i+1, len(nums)): if nums[i] + nums[j] == target: return [i, j]가장 쉽게 떠올릴 수 있는 방법이다. 하지만 첫 번째 for .. 2024. 12. 2. 이전 1 다음