Staircase search problem

i had done the problem can u please tell me that is my code is wrong or right…

my code ide link is :

if its correct then please “deeply” explain me the while condition that i had used in my code…
if previously used:
while(start_col<end_col)
that doesnt work…

kindly explain with contrast to current while statement.

reagrds


the code is correct
i have tried to explain using the image

if still u find somethingthat u are unable to understand please ping back


image
updated variable sc to sr for better understanding

exactly thats what i want to understand…

1 Like

thanks a lot…

1 Like

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.