How do we know from which corner we have to start our search, how to implement that in the code.
Finding right corner
In staircase search, you take the top right element of the matrix as the starting point (as this is a point in matrix from where if you move downwards, the number increases and if you move leftwards, the number decreases).
Similarly, you can also take the bottom right as starting point because value decreases on moving upwards and increases on moving rightwards.
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.