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.
with what protocole? What inputs? how were you measuring the time?
Without this kind of information, any perf tests is worthless (and as a matter of fact, yours sounds pretty suspicious: I bet you tried in the trainer? Then you're not measuring anything except the docker which is using most of those times => not reliable)
note: spoiler flag...
This comment is hidden because it contains spoiler information about the solution
Oh my god, my solution with 'undefined' was accepted, in that case, we need to feedback more strict cases for this kata.
The description is talking about JS. In Python you have to fill it with
None
's.as mentioned in the details' description above, when called with prefill(1), should return ['undefined'], but there seemds to be no testcases of this kind.
That's an old code of mine. An ideal solution would not even iterate over the whole array like the one I've just submitted.
your code is also O(n) and much cooler, exactly what i was seeking in the solutions. thumbs up
This comment is hidden because it contains spoiler information about the solution
this solution has O(n) complexity
This comment is hidden because it contains spoiler information about the solution