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.
I think it is quit a complicated code for beginners, and also it is not the fastest approach to solve such a simple problem. So, why to write such a long code that too when you can do the same work within 5 to 6 lines of code.
too complex for this problem