Skip to content

Commit 7d43110

Browse files
authored
two-sum
two-sum
0 parents  commit 7d43110

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

two-sum

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
2+
3+
You may assume that each input would have exactly one solution, and you may not use the same element twice.
4+
5+
Example:
6+
7+
Given nums = [2, 7, 11, 15], target = 9,
8+
9+
Because nums[0] + nums[1] = 2 + 7 = 9,
10+
return [0, 1].

0 commit comments

Comments
 (0)