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.
No?
I am just guessing that if the input is an array of integers where all the integeres are different, then the speed would drop significantly?
If it happens every time than you solution is too slow.
What do you mean by limited? It works for any input.
Kind of nice Kata. However it is only solvable with a certain assumption on the input set. Since the values used are limited the caching is a viable option. However this is not a generic solution for any type of input. Thus I would suggest that it actually states that the input ranges of values are limited.