Given a sorted array `nums` and a `target`, return the index of `target`, or -1 if it is absent.
Halving the search space each step is the same instinct as a titration — narrow in until you bracket the answer.
Input: nums = [-1,0,3,5,9,12], target = 9
Output: 4
Input: nums = [-1,0,3,5,9,12], target = 2
Output: -1
// hit Run to execute the sample tests
// Interactive editor preview. Live code execution arrives with your early-access cohort.