Search an element in the sorted rotated array
Question: Implement a search function for a sorted rotated array. Duplicates are allowed. Returning any one of the duplicates is acceptable.
So for example we have sorted array as -
2,3,6,12, 15, 18.
Now suppose the array is rotated k times ( we don’t know k), such that array becomes
15, 18,2,3,6,12
Answer: We can do a binary search with some modified checks.
So lets take arr as array, start be start of the array, end be arr.
[Read More]