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.
It's certainly more intricate than it needs to be ;)
Assymptotic complexity is just one way of thinking about algorithm performance. As I've already pointed out, it ignores overhead, so it's not the whole story. Also, there's lots of other tricks to improving algorithm performance.
Anyway, in the Kata description you have:
The specifics of the specs of the codewars backend are subject to change, so you can't really account for architecture here when designing your solution.
As general advice, this is a 4 kyu kata, so you are expected to write an efficient solution.
First: Just because an algorithm has good time efficiency doesn't mean that it's efficient in the real world. The classic example is the Coppersmith-Wingrad algorithm for matrix multiplication, which has the best known time complexity of any matrix multiplication algorithm but has a massive constant overhead that means its never used in real life.
Second: I don't set the timeout for this kata (or any kata). It's no more than 5 seconds, although this is potentially subject to change. The server will report when there is a timeout.