Given a rotated sorted array `nums` of distinct values, implement `search(nums, target)` returning the index of `target` or `-1`.
+ 1 hidden test run on Submit.
Modified binary search checks which half is ordered and narrows accordingly. O(log n) time.
Run your code to see results.