We will use a number of mechanisms to represent trees.
An immutable tree never changes. Once a node is created it may be used as part of another tree. The methods used are static because we do not take advantage of objects.
Immutable Binary Trees
This example creates a tree and prints it out in in-order.
Change the file to that the node England has two children "North" and "South".
Complete the function to count the nodes.
Complete the function to count the depth of the tree.
Flip a Tree
Insert in Order
You must return a tree with the same root node as before. You add the new item to the left or the right depending on the compareTo result.
You must return a tree with all the values doubled.