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
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.
Ruby translation
Maybe I'm missing a nuance in what is expected, but the C++ test_tree_with_23_nodes test (and later) seem broken. Ex for test_tree_with_23_nodes test:
Expected: [ 12, 13, 16, 1, 40, 29, 2, 19, 6, 35, 3, 38, 6, 22, 29, 8, 10, 10, 8, 21, 1, 36, 33 ]
Actual: [ 22, 8, 35, 3, 13, 29, 38, 1, 6, 10, 19, 29, 33, 36, 40, 1, 2, 6, 8, 10, 12, 16, 21 ]
As you can see, the expected starts out incorrectly sorted after the first level
Lua translation!
Scala translation
The override on
runTests
is largely required if you want nice output along with only running the last test when all others are green.This comment is hidden because it contains spoiler information about the solution
Python initial solution:
typing.List
(along withtyping.Set, typing.Tuple ...
) are deprecated since Python 3.9. Most built-in types likelist
now directly support type hints:files: list[str]
This comment is hidden because it contains spoiler information about the solution
python new test framework is required. updated in this fork
This comment is hidden because it contains spoiler information about the solution
Scala translation
Anyone have any advice on how to pass the "testRandomTrees" test case ?
hitting error: arrays first differed at element [2]; expected:<8382> but was:<308679>
Not sure how to go about it. Or if anyone had similar issues.
Rust translation
TypeScript translation (based on existing Java Translation)
Loading more items...