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.
Scala translation
What is the reason to have an empty array as an argument in one the tests when
Node
isn't even similar to an array?The context is non-sensical: a tree having children defined as a list should NEVER have anything else than a list for the children property. A leaf is just a node with an empty list. Using
None/null/...
or anything that isn't a list (or at the very least an iterable, let's say) just implies the initial design is... bad.So:
Cheers
No random tests
There is already a calculator kata (https://www.codewars.com/kata/calculator, 3 kyu), so it's definitely a duplicate.