Staircase Search for 2D array

I am having problem in figuring out what’s wrong in my code for this Staircase Search in a 2D sorted array.
My code is present at this link

Please help me in figuring out what’s wrong in my code.

I figured out where i was wrong .

@sayangosw your code is working fine:


if you have any doubt you can ask here:
Happy Learning!!

Thanks,it’s working fine

@sayangosw you can mark this as resolved.
Happy Learning!!

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.