Question
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with 23 nodes is _________. (answer in integer)
Official answer and solution
- Official answer
- 11
- From
- Official GATE 2026 answer key
Solution
Minimize the number of nodes at each level of a full (strict) binary tree, where every internal node has exactly 2 children.
In a full (strict) binary tree, every node has either or children. To maximize the height for a given number of nodes , each level from to should contain the minimum possible number of nodes, which is nodes per level (one internal node and one leaf at levels , and two leaves at level ). Thus:
11
Confusing a full binary tree with a general binary tree (which would have max height ).
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 33 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.