Search In Row and Col Wise

is this the same as staircase search? and why do we only select the top right element?

Yes it is similar. We choose the top right element as it is the most suitable for it. Because elements to left of it are smaller and the elements downwards are larger. So if target is less that top right element you move leftwards and it target is greater then you move downwards.

But un staircase we chose 2 positions lower left and upper right? Whay is the difference?

Yes …you can choose any…upper right or lower left…Lower left will also do.

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.

that means it is exactly same as staircase search?

Yes…solve the question…if still you have issue you can reply me back.