Error in line 19 of matrix search

if I change i<=n and replace && with || the code works fine else failing on last test case. Unable to understna dwhy this is not showing out of bound error on i==n

@piyush.bansal8158625 hey piyush can you please create a error senario so that I can help I am not able what are you trying to say

if you run my code as it is it will fail in last case. I don’t know why?. if you make changes in line no 19*. i<=n and replace & & with || it will run and pass the last case… for i<=n it
is out of bound error according to me…

@piyush.bansal8158625 please make this changes then share your code.


new code after changes at line number 19

old code without changes at line no 19

@piyush.bansal8158625 hey piyush there is small modification in your old code is that j=m-1