|
|
|
@ -1,17 +1,22 @@
|
|
|
|
|
## twosum |
|
|
|
|
|
|
|
|
|
### Instructions: |
|
|
|
|
Given an array of integers, return indices of the two numbers such that they add up to a specific target. |
|
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
Given an array of integers, return indexes of the two numbers such that they add up to a specific target. |
|
|
|
|
|
|
|
|
|
If there are more than one solution, return the first one. |
|
|
|
|
|
|
|
|
|
If there are no solutions, return nil. |
|
|
|
|
|
|
|
|
|
Expected function: |
|
|
|
|
|
|
|
|
|
```go |
|
|
|
|
func TwoSum(nums []int, target int) []int { |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
Here is a possible [program](TODO-LINK) to test your function : |
|
|
|
|
|
|
|
|
|
```go |
|
|
|
|
package main |
|
|
|
|
|
|
|
|
|