I used binary search to find the pivot and once the pivot is found I used binary search again to find the target number within the subArray.
In terms of time complexity, it's O(logN) because of binary search. In terms of space complexity, it's O(1) because the it does not require extra storage space depending on the input list size.