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 comment is hidden because it contains spoiler information about the solution
It actually is Preloaded, and it has now been
const
ed and frozen.This comment is hidden because it contains spoiler information about the solution
How does subsequent calls to defaultArguments() manage to extract the parameter names? I don't understand how the original parameter list is still available after the wrapper function is put in place.
Oooooohhhhh, I totally get it now.
Good solution, at the cost of memory. It's always a time/memory tradeoff.
JavaScript's sort function is O(nlog(n)), so my algorithm would be O(nlog(n)) on average. Doing the standard nested loops method will average O(n^2), making my method more efficient on average.
But that's theoretical and I'd have to crunch the numbers, but I'd bet that in normal cases where there are only three or four arguments, the difference is slight.
This comment is hidden because it contains spoiler information about the solution