A strictly increasing array was rotated at an unknown position. Given the rotated array and a target, return the target's index.
Return -1 when the target is absent, using logarithmic time.
Inputnums = [4, 5, 6, 7, 0, 1, 2], target = 0
Output4
Inputnums = [4, 5, 6, 7, 0, 1, 2], target = 3
Output-1
1 ≤ nums.length ≤ 5,000