Maximum height of a full binary tree
Tree Properties & Traversals

Answer & solution
Official answer: 11
Givens and goal
A full binary tree has 23 nodes. Height is the number of edges on its longest root-to-leaf path. Find the largest possible height.
Approach
Count internal nodes using the full-tree property, then arrange them along one deepest branch.
Step-by-step solution
1. “Full” means every node has either zero children or exactly two children; it does not mean balanced or complete. Let I be the number of internal nodes and L the number of leaves.
2. Every internal node contributes two child edges, so the total edge count is 2I. Any tree with I+L nodes has I+L−1 edges. Equating these gives L=I+1 and total nodes 2I+1.
3. With 23=2I+1, there are I=11 internal nodes and L=12 leaves.
4. A root-to-leaf path of h edges has h nonleaf nodes before the final leaf. All h are internal, so h≤I=11.
5. This bound is achievable by a comb: each of the first ten internal nodes has one leaf child and one internal child continuing the path; the eleventh has two leaf children. There are 11 internal nodes, 12 leaves and a deepest path of 11 edges. Therefore the maximum height is 11, not the roughly logarithmic height of a balanced tree.





















![Question 13, GATE 2006: Store any n-node binary tree in a one-based array: root at X[1], left child of X[i] at X[2i], right child at X[2i+1]. What minimum array capacity guarantees room for every possible n-node tree?
Options:
(A) log₂n
(B) n
(C) 2n+1
(D) 2^n−1](../../../assets/questions/CS-2006-Q13-1.webp)
![Question 13, GATE 2006: Store any n-node binary tree in a one-based array: root at X[1], left child of X[i] at X[2i], right child at X[2i+1]. What minimum array capacity guarantees room for every possible n-node tree?
Options:
(A) log₂n
(B) n
(C) 2n+1
(D) 2^n−1](../../../assets/questions/CS-2006-Q13-2.webp)
























