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.
Oh my god, my solution with 'undefined' was accepted, in that case, we need to feedback more strict cases for this kata.
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.
your code is also O(n) and much cooler, exactly what i was seeking in the solutions. thumbs up
this solution has O(n) complexity
This comment is hidden because it contains spoiler information about the solution