I have several lists:
A = [\"a0\", \"a1\"] // the number of lists varies
B = [\"b0\", \"b1\", \"b2\"] // such as the number of elements in a list.
C = [\"c
1,Find leaf node
2,Up traversal from leaf node
public void printPath(N n) {
if (n == null)
return;
if (n.left == null && n.right == null) {
do {
System.out.print(n.value);
System.out.print(" ");
} while ((n = n.parent) != null);
System.out.println("");
return;
}
printPath(n.left);
printPath(n.right);
}
printPath(Root);