This was asked in my interview,Here the actual meaning of the question is to find the time complexity or specifically worst case time complexity of an array of elements which are already in the sorted order.
Main point to note here is the difference between the two adjacent numbers in the array are very small or insignificant.
I approached this problem as a simple binary search which requires the array to be in sorted order and thought the Worst case time complexity is O(log n). But will this answer will change if the array elements are very close to each other as mentioned in the question.
What is the correct approach to solve this problem.
According to the question we can assume the array as below picture.
Thisis defenitely not what iam asking which was shown below , because the elements are sparely differ in the difference between them and we can use binary seach.

