81. Search in Rotated Sorted Array II

#binary-search

Problem

Intuition

The intuition is same as 33. Search in Rotated Sorted Array, but the optimisation we could do is based on what all values we have access to. If they are same, then we move low to right and high to left.

Time Complexity

O(log n)

Space Complexity

O(n)

Solution

Last updated