2 out 3 test case passed .where i am doing wrong?

@711tri
hello ayush ,
in line number 41 replace if(arr[i][j]>k||j==n) with if(j==n|| arr[i][j]>k)

i did but same result ( 2 out 3 test case passed)

please refer this link

@711tri
… which link?

@711tri
hello ayush,
in line no 41,it should be if(j==m ) only rest of ur code is correct.
also pls check its optimised approach

@711tri
optimised approach