An array sorted in ascending order is rotated at an unknown pivot. Given the rotated array and a target, return the index if found; otherwise return -1.
Example 1:
Input:
nums = [4,5,6,7,0,1,2] target = 0
Output:
4