Pivot of sorted and rotated array
@Learning_bunny i don’t get why are you taking a key and doing binary search accordingly.
your first function findpivot will work fine, do not take key or use pivoted binary search function just call your print findpivot(arr,0,n-1) and your code will work fine.
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.