Sprial print anticlockwise


1 test case is wrong can you tell me why

Hello @Dhruv-Miglani-2090236747707980,

As the m and n can have any value from 1 to 10.
Your test case is producing wrong output for the case when they is a single row:
Example:
1 4
1 2 3 4
Expected Output:
1, 2, 3, 4, END

I have modified your code. Check it here:

Hope, this would help.
Give a like, if you are satisfied.

1 Like

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.