Help rahul to search(testcase)
Hi Shubham, consider the following test case:
5
9
0
1
2
3
0
Your output is coming out to be -1 even though 0 is present in the array. Since the array is rotated, you have not applied the correct logic to apply binary search on a rotated sorted array.
Hi Shubham, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.