Where am i going wrong?

You have sent the code of spiral matrix priniting, send the correct code’s ide link, so that i can help you.

sorry. Here is the correct linke :- https://ide.codingblocks.com/s/204700

@itismohiton your approach doesn’t seems to be correct, please explain your approach.
Also try to think of DP solution for these constraints.

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.