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.
This is incredibly complex, but cool. Bravo!
"Focus on efficiency" at the end of kata description is the hint what you shoud do.
You'll have to optimize your code...
I agree: rank should be higher. Not because of the task difficulty, but due to big amount of optimizations necessary to pass the time limit of tests.
Funny kata. I had to prepare 4 solutions, one faster than the other. All tests passed, but still too slow.
Out of curiosity I compared the final one to the one in test evaluation (much more elegant, but slower): mine was 5 times faster (my dblLinear(100000) was 4.4s, "original" 22.7s) !
So most of the time wasted during test was not because of my solution(s), but because of the test evaluation itself. That's sad...
On the other hand I've learned a lesson about speed of PHP array operations, so I'm somewhat satisfied...