Problem of Matrix_Search

Two test cases are not getting passed. Please help me out in solving this problem.

@Gade_Deepthi hello,you have used simple linear search that’s why two test case are not working ,as row and columns are sorted ,think of binary search to find element x in matrix.Try it and feel free to ask any doubt.

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.