You're given a sorted array and a target value. Your task is to find the index of the target, or return -1 if it doesn't exist.
For [-1,0,3,5,9,12] with target=9, you'd return 4 since the element at index is .
You could scan left to right in , but there's a faster approach. Since the array is sorted, think: how can you eliminate half the remaining elements with each comparison?
Constraints: , array is sorted with unique values.