I tried to google on this topic, but could not find anything satisfactory.
Question is: Can we apply the binary search for the un-sorted array to that the search can be done in O(logN) or so.
Could please someone point me to the right solution for this problem.
PS: I am 80% sure that this post might be duplicate
You can’t binary search on an unsorted array. Simple as that. The monotonic increasing or decreasing function is essential to the binary search, so you can decide in which half to continue searching.