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.
You should minimize your code time complexity. Or if that is not possible (any more), you should optimize your algorithm to perform less costly operations.
Hint: your solution should be fully linear, sorting the input array will already make you time-out.
Also, I've updated the tests, so you'll have to reset your trainer, reload the page, and... reset the trainer again. Save your code before doing that (Ctrl+C) as everything will be cleared and restored to defaults (alternatively, after doing these operations you can click onto the trainer and press Ctrl+Z, as clearing the editor window through
reset
is a reversible operation).your code: you have to think about a more efficient algorithm.
I have to agree with this.