Find a value in a rotated sorted list
A list of distinct integers was sorted in increasing order and then rotated: some prefix (possibly empty) was moved to the end, as in [6, 8, 9, 1, 3, 4]. Given that list nums and an integer target, return the index of target, or -1 if it is not there.
nums may be empty. Aim for O(log n): a linear scan misses the point.
Examples
find_rotated([6,8,9,1,3,4], 3)→4find_rotated([6,8,9,1,3,4], 8)→1find_rotated([6,8,9,1,3,4], 5)→-1