there integer array num sort ascending order distinct valuesPrior pass function num possibly rotate unknown pivot index k 1 k numslength result array numsk numsk1 numsn1 nums0 nums1 numsk1 0indexed for example 0124567 rotate pivot index 3 4567012given array num possible rotation integer target return index target num 1 numsYou write algorithm Olog n runtime complexity Example 1input num 4567012 target 0output 4example 2input num 4567012 target 3output 1Example 3input num 1 target 0output 1 Constraints1 numslength 5000104 numsi 104All value num uniquenum ascend array possibly rotated104 target 104