Search in Rotated Sorted Array II

Solution Code

Time Complexity

O(log N) average, O(N) worst case

Space Complexity

O(1)