Array-spiral print anticlockwise challenge

Can’t find the flaw in this code.Test cases are failing.

Please help me with the above mentioned code.

I have edited your code… Try to submit now…