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.
About the edit, you're right, the value should be inserted at the end, and that's why it fails.
Your code being wrong is not a kata issue, see the sample test it fails and you'll see why it fails. The value to insert is not always already contained in the array that's why your code returns -1. About your second solution, it now fails 100% of the time.