Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
6 lines (6 sloc) 240 Bytes
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
for i, vi in enumerate(nums):
for j in range(i+1, len(nums)):
if vi + nums[j] == target:
return [i, j]
You can’t perform that action at this time.