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.
By the way, you probably use an exponential algorithm to get your result and therefore have O(2^n) instead of O(n).
I can't say better:-)
This means your code is not optimal enough.
When you press "Run tests", you run the simple tests, which are editable.
When you press "Submit", you run the validating tests, which you cannot edit and which may be quite heavy. If you get the 6000ms error, your code is just too slow, and you have to refactor it so it manages to run the submission tests within 6 seconds.
https://github.com/Codewars/codewars.com/wiki/Error-messages:-Submission-timed-out#huh-it-says-now-process-took-more-than-6000ms-did-they-change-the-message