sir/mam…do I need to solve this problem using binary search?
Implementing the prob

sir, I have implemented it as you have told me but still I’m facing difficulties.
share ur code using cb ide.
i will check
how to do that, do I need to share the link?
sir, have u checked my code?
yeah,
![]()
use >=
do similar change in second loop as well
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.
there is still doubt sir, the test cases are not getting passed.
have u done the changes that i suggested
check ur corrected code here->
thank you sir, I got my answer.
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.