What() error how to fix it?

thats my code

@chemant077 the place where you are printing solution inside the function you have taken your first for loop upto n but it should be i<=n because you have passed n-1 as n in the function.similarly 2nd for loop should go upto <=m.

only two test case passing

@chemant077 give spaces between elements while printing and you are good to go.

@chemant077 if still you have doubts ask me else mark this doubt as resolved.

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.