What am i doing wrong


HERE IS THE CODE

hi @hhiteshbansal_40d12e2460a1738e
I have corrected yr code… It’s working fine now–>


yes but what wrong is in this code of mine
i have corrected it but with
Input
10
6 9 2 6 3 5 4 7 8 10
wrong output is coming

hi @hhiteshbansal_40d12e2460a1738e

while(s<mid && y<=l){

here s will run till mid ie make it s <= mid
ur code will work fine…

I hope it’s clear now??

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.