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.
I just hate myself for not doing that like this!!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Very clever!
With 1000000 items in list, recursion not viable...
"Uncaught RangeError: Maximum call stack size exceeded"
Unfortunately, it'll return
lenR([0,1]) => 0
because it checks for truthiness ofhead
. Should have checked forhead===undefined
.For some reason, my codewars editor doesn't recognize Object.values yet.
Love your aproach!
Unfortunately, it doesn't work on my browser.
This comment is hidden because it contains spoiler information about the solution