Skip to content

Commit 0585d30

Browse files
committed
two-sum solution
1 parent feb2dc0 commit 0585d30

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

two-sum/Donghae0230.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def twoSum(self, nums: List[int], target: int) -> List[int]:
3+
for i in range(0, len(nums)):
4+
for l in range(0, len(nums)):
5+
if i == l:
6+
continue
7+
if nums[i] + nums[l] == target:
8+
return [i, l]

0 commit comments

Comments
 (0)