we want to find the given no in rotated array ,so why inbuilt lower_bound function is giving wrong result , afterall all we need is first occurence of given value
Why is inbuilt lower_bound function in this question giving wrong result
@dgoyal
hello diwanshi,
lower_bound works on sorted array, here u array is not sorted ,thats why it is giving wrong result
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.