sir in these type of question we can use staircase method so why we are using these…
Search in row and col wise
hello @YASHMATHURIA123
we are using staircase method because it is most efficient alogorithm to find the target element in given 2d matrix. its time complexity is O(n+m) where n ,m are number of rows and number of columns respectively.
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.