Constraints
- Is there exactly one solution?
- Yes
- Is there always a solution?
- Yes
- Is the array an array of ints?
- Yes
- Is the array sorted? No
- Are negative values possible?
- Yes
- Can we assume the inputs are valid?
- No
- Can we assume this fits memory?
- Yes
Instructions:
-
Program should be written in file build.py
-
Function name should be two_sum.
-
Input
Type: List, Integer Value: [9,12,5,1,13,18,-12,20,7], 16
-
Expected Output
Type: List Value: [0,8]