Code is compiling but not on submission it's giving error

code is compiling but not on submission it’s giving error

@talhashamim001 plz help

hi @utkarsh.gupta0311
check this ive commented do the dry run of the given matrix i commented below in the code for better understanding
u can check your code also for the commented out matrices

sir my code is not working for different values of n and m
its only working when n=m

han to refer the code i gave

please check my code if i can be changed for n not equal to m
i have written that code with so many efforts

@utkarsh.gupta0311 no worries buddy, check that code u will learn only, and do dry run for the matrices i gave with your it will help u

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.