An ascending array of distinct integers nums was rotated at some unknown pivot. Given nums and a target, return the index of target if it is present, otherwise return -1.
Your algorithm must run in O(log n) time.
[4,5,6,7,0,1,2], 0[4,5,6,7,0,1,2], 3[1], 0[5,1,3], 5[4,5,6,7,8,1,2,3], 8[6,7,8,1,2,3,4,5], 3