Hello Guys,
I am traversing a binary tree in java. I can print the whole tree whitout any problem.
I do it this wat
private void printNode(String path)
{
if ((left==null) && (right==null)){
System.out.println("Val \"" + MyChar + "\" binary value " + path);
}
if (left != null)
left.printNode(path + '0');
if (right != null)
right.printNode(path + '1');
}
public static void printTree(Nodes tree)
{
tree.printNode("");
}
It is working well, but i cannot find the method to access to a specific value for example
0111
Could you give me a hand it would be really appreciated