I have binary tree in java to build family members tree.
In add function, I want to determine the parent that will have new child, after that, the user enter the name of new child.
The problem I face is the family tree cannot compare such as the tree has integer numbers.
Is there a method to do this?
This is a main in my code:
to more clear :Code:
static public void main(String args)
System.out.println(">>> creating empty tree");
StringBinaryTree t = new StringBinaryTree();
System.out.println(">>> adding elements to the tree");
I want to achieve read the input from the user for the new child .e.g in my code I want to add child for (Zebra) but this child is enter from the user and thanks