Help rahul to search


showing
run time error for one case

hi @sp5513
here was the mistake-

1. A[s]<=key<=A[mid]
2. A[mid]<=key<=A[e]

u will have to use && operators, u cant simply write like this…

corrected code -->

hi @sp5513
is it clear now??

why we cannot write A[s]<=key<=A[mid] insead of writting A[s]<=key && A[mid]>=key , why we need to use the and operator

hi @sp5513
It’s c++ syntax… u have to use operators only…

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.