Height of binary tee
Longest path from the root the leaves.
/** * Find the height of the binary tree given the root node. * @param root * @return Height of the longest path. */ protected int computeHeight(Node root){ if(null… read the rest.
Longest path from the root the leaves.
/** * Find the height of the binary tree given the root node. * @param root * @return Height of the longest path. */ protected int computeHeight(Node root){ if(null… read the rest.
Traversing binary tree. Since tree is a graph, both the depth first traversal and the breadth first traversal idea works.