Please tell me What’s the error is this.
Why is this giving correct output?
@cbcao263
hello aryan,
u are accessing i+1 index so make sure that value of i+1 < n otherwise it will give segmentation fault.
also we have one efficient approach as well so checkout that as well-> https://www.ideserve.co.in/learn/find-pivot-in-a-sorted-rotated-array
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.