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.
At least in JavaScript this would be counterproductive. NodeJS doesn't support TCO.
It's a nice idea, but even for languages that support TCO, the description should then state that as a constraint, and the ranking would be higher.
You should add a test for a rather large list, so that solutions that are not tail-recursive produce stack overflows.
This is not tail recursive, and as such is not optimized well. If the list is long, you'd end up with a stack overflow.
In your daily programming, whether for work or for leisure, you should always strive to have function return types that make sense. If your function returns an array, then don't return
false
in the event of an error. Similarly, if your function returnstrue
in one case, it should returnfalse
otherwise. Be consistent.That's still a fragment an is in no way verifiable to check for. The slash is only a convention. There is nothing preventing a page from doing navigation from index.html#pathgoeshere (and several of my pages does this).
Test for links with multiple #-signs.
This would fail if your url had multiple '#' (totally legal as far as I know).
The description never specified that I should return false if there was no duplicates, and failed me for returning undefined.