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.
Interesting, but I think it's too late to alter the acceptance criteria such that solutions that have already passed would fail. Such changes are typically done when the kata is in beta. But, I encourage you to write a new kata that addresses such edge cases. One suggestion is: Given S, find a minimal set S' such that S'and S have the same closures.
This comment is hidden because it contains spoiler information about the solution
Awesome kata, thanks very much. I enjoyed solving it.
Random inputs are now guaranteed to consist of positive numbers.
It is theoretically possible for a random input to be
[ 1 ]
, in which caseclosureGen([ 1 ])[999]
is tested againstundefined
. This makes sense in the language; I'm not preventing this degenerate case.The point in the description is not to show all the steps in a recursion, but to show how the rules can be used to determine the values of the function. You can use recursion, but that's up to you. It's also your job to figure out why and how one could use recursion.
I believe there is an error in the example portion of your intructions that lends to some confusion.
Current:
"Putting these results together fusc(10) = fusc(5) = fusc(2) + fusc(3) = 1 + 2 = 3"
Should be:
"Putting these results together fusc(10) = fusc(5) = fusc(2) + fusc(3) = 1 + fusc(1) + fusc(2) = 1 + 1 + 1 = 3"
Even more accurately:
"Putting these results together fusc(10) = fusc(5) = fusc(2) + fusc(3) = fusc(1) + fusc(1) + fusc(2) = 1 + 1 + fusc(1) = 1 + 1 + 1 = 3"
The example should show all the steps of recursion. Currently it appears that fusc(3) directly equals 2 when actually there's another step of recursion that further expands fusc(3) into 2 more functions. I think it's important to show this extra step for clarity.
Great kata, thank you.
the function "enumerate" is so cool!
Took me a few iterations to get this one liner.
i refused to admit that you guys got this solution the first time you went through
Ruby translation
Great kata!
Pretty challenging kata mathematically speaking though.
work smarter not harder :P
That is some clever obfuscation. It turns out to be definitely in the 7 kyu neighborhood, after random tests timed out, and I was briefly tempted to use pthreads. whew!
Loading more items...