Computer Sciences > GATE 2026 SET-1 > Trees
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)

Correct : 11

A full binary tree requires every node to have exactly 0 or 2 children. With 23 nodes, the number of internal nodes = (23−1)/2 = 11 and the number of leaves = (23+1)/2 = 12.
To maximise the height, we build the tree as a right-leaning skewed chain. At each level along the main path, we place one internal node whose one child is a leaf (terminating there) and whose other child continues the chain down to the next level. This uses one internal node and one leaf per level.
With 11 internal nodes, the main chain goes from level 0 to level 10, consuming 10 internal nodes and 10 leaves (one leaf per level as a sibling branch). The 11th internal node sits at level 10 — it has no more internal node children available, so both of its children must be leaves at level 11. This accounts for the remaining 2 leaves, giving a total of 12 leaves ✓
The deepest leaf is at level 11, and since height is defined as the number of edges in the longest root-to-leaf path, the maximum height = 11.
Correct answer: 11 ✓

Similar Questions

Consider a complete binary tree with 7 nodes. Let A denote the set of first 3 elements obtained by performing Breadth-First Search (BFS) starting from the root....
#1081 Fill in the Blanks
Consider the expression tree shown. Each leaf represents a numerical value, which can either be 0 or 1. Over all possible choices of the values at the leaves, t...
#1271 Fill in the Blanks
Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?
#1369 MCQ

Related Topics

full binary tree maximum height GATE 2026 GATE CS 2026 Set-1 Q40 full binary tree 23 nodes height 11 maximum height full binary tree skewed GATE data structures GATE 2026 full binary tree internal nodes leaves count

Unique Visitor Count

Total Unique Visitors

Loading......