Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thanks for the reply. I realized that I misunderstood your solution.
I got the result after transition but not the position array.
I made it!
How can 0 become 6, I thought it should be 4.
[down down right right right down down right]
And 6 becomes 4?
[left left down left left left left down]
Learn some math guys, no space occupied, operate in O(n) time.