Wave Print Question Column Wise

The code is not passing test cases. I don’t what is the error because it is working fine for the given test case. Please tell what is the error?

Hey @Sakshi2004 i guess you have code it when you have size of ,matrix is of N X 2, cause for input
3
3
1 2 3
4 5 6
7 8 9
Expected output is:
1, 4, 7, 8, 5, 2, 3, 6, 9, END
Yours is giving is:
1, 4, 7, 8, 5, 2, END
Check your logic once, if you want any other help. Feel free to ask.

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.