
Patrick B. answered 03/17/19
Tutor
4.7
(31)
Math and computer tutor/teacher
It shall require a recursive class definition for TreeNode;
something like this:
class TreeNode
{
private TreeNode parent;
private [] TreeNode children;
};
Care must be taken on constructor so that an endless sequence
of recursive calls does not blow up the VM heap.