Arrays spiral print anticlockwise

This works fine on custom input, but if I submit the code, I see no results. The button times out and just stops. Is it a technical glitch or is something wrong with my code?

@abhishekchoudhary hey,Your code exceeds time limit thats why it is not giving answer,please correct your code and submit again,if you have any doubt please ask.Happy coding :slight_smile: