Write int solve(int *nums, int len, int target) that returns the index of target in the sorted array nums (which has len elements), or -1 if it is not present.
C: Binary Search
Examples
- solve([1,3,5,7,9], 5, 5) → 2
- solve([1,3,5,7,9], 5, 4) → -1