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.
I only wanted to avoid global variables. Maybe not worth it (but I'm happy I know how to do it now).
Concerning the last comment, the final codes depend on the way you build your tree. For example, in the situation of the example, here is a valid tree
..*
./.\
a...*
.../.\
..b...c
which will give a:0, b:10, c:11. Otherwise, you can exchange b and c on the tree (and get a:0, b:11, c:10) and a and the node (and get a:1, b:01, c:00 or a:1, b:00, c:01).
What you won't get is something as you suggest with a:0 and c:01. Thing is the left-most digit is how you go from the root to the first nodes and a is in another component than b and c (because as they have the 2 smallest frequencies, b and c are paired).
This situation is unrealistic. Even with the fastest elevator in the world, there is no way you'll manage to go 10 to the power 3000 (which is roughly the answer to height(4477,10000)...) floors up multiple times so that you can re-use unbroken eggs. (Even just once actually...)
Actually, it does follow from that statement. It seems (sorry but the description of this kata is extremely confusing) that the "target floor" is the highest floor from which an egg would not break. If an egg breaks from floor 1, then target floor is 0 which is not "between 1 to this maximum height".
This comment is hidden because it contains spoiler information about the solution