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.
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!
Thanks natan, I will give that a try.
That's an interesting situation you found. It's a strange thing to be testing without any corresponding specification - it has purpose but I think the test output should be phrased differently because that's bit of a red herring. If you print out your parameters a b c that should tell you enough to continue.
This comment is hidden because it contains spoiler information about the solution
i thought it needs algorithim binary tree or somesthing like that using recursion
but found that it need a better look numbers reltion to each other starting from n
Loading more items...