There is an integer array nums sorted in ascending order with distinct values, which is possibly rotated at an unknown pivot. Given this array and an integer target, the task is to find the index of target in nums, or return -1 if it is not present. The solution must have a runtime complexity of O(log n).
Click Run to execute sample tests.