sir one test case is failed
please check !
Matrix search problem
Consider this case:
4 4
1 4 8 10
2 5 9 15
6 16 18 20
11 17 19 23
23
Your code gives output as 0.
You do not require a nested loop here. You can do it using a single while loop. Refer this https://ide.codingblocks.com/s/335105
still one test case is failing… and why we cannot use a nested loop here ?
Check now https://ide.codingblocks.com/s/335124 There was a slight mistake there in line 10.
Nested loop is not required here. The problem is same as the Stair Case search whose lecture video must be there in the course.Please refer that video first.
You could simply do it with a single while loop in Linear time.
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.