Question Details

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)

Options

A

11

B

42

C

54

D

32

Show Answer
Correct Answer
A 11

Solution :

The correct option is 11.

Let us understand the definition of a full binary tree and how we can achieve the maximum possible height for a given number of nodes.

A full binary tree (sometimes called a proper or 2-tree) is a binary tree in which every node has either 0 or 2 children. In other words, no node in a full binary tree has only one child.

We are given that the tree has N=23 nodes, and we want to find the maximum possible height h of this tree. The height of a binary tree is defined as the number of edges on the longest path from the root to a leaf node.

To maximize the height of a full binary tree with a fixed number of nodes N, we must make the tree as skewed as possible. In a full binary tree, to extend the height by 1 at each step while maintaining the full binary tree property, we must add exactly 2 children to a leaf node at each level.

Let us construct the tallest full binary tree step-by-step:
At level 0 (the root): we have 1 node. To make it a full binary tree, it must have 2 children (at level 1), or be a leaf. Since we want to maximize height, we add 2 children.
Now we have 3 nodes in total, and the height is 1.
To increase the height to 2, one of the nodes at level 1 must have 2 children. The other node at level 1 remains a leaf (0 children).
This adds 2 more nodes, making the total number of nodes 5, and the height becomes 2.
Continuing this process, at each step we select one leaf at the deepest level and give it 2 children. This increases the height by 1 and adds exactly 2 nodes to the tree.

In general, for a full binary tree of maximum height h, the relationship between the number of nodes N and the height h is given by the formula:
N=2h+1

We can rearrange this formula to solve for the height h in terms of N:
2h=N-1
h=N-12

Substituting the given value of N=23 nodes into the equation:
h=23-12
h=222
h=11

Thus, the maximum possible height of a full binary tree with 23 nodes is 11.

Transparent Access on Mindyard

Built for Learners & Educators Alike

Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.

FREE FOR STUDENTS

Practice & Learn Free for Students

Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.

  • Unlimited mock tests & question bank practice
  • Full access to curated study library & formula notes
  • 100% free for students • No credit card required
2 MONTHS FREE TRIAL

Educators & Coaching Institutes

Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.

  • AI question uploader & rapid test generator
  • Anti-cheating tab proctoring & performance reports
  • Full Pro access free for 60 days • No upfront commitment
Discover more resources

You may also like

Mock Tests

View All
  • GATE
  • beginner
  • 3 hours
  • civil engineering

Prepare for GATE 2026 Civil Engineering with the latest question papers, previous year papers, detailed solutions, syllabus, exam pattern, preparation tips, mock tests, and subject-wise study material. Download GATE 2026 CE question papers with solutions in PDF format and boost your preparation for top engineering institutes and PSU recruitment.

  • GATE
  • beginner
  • 3 hours
  • electronics and communication engineering

Prepare effectively for GATE 2026 Electronics & Communication Engineering (EC) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Electronic Devices, Analog Circuits, Digital Circuits, Signals & Systems, Network Theory, Control Systems, Electromagnetics, Communications, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 EC preparation strategy.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...
Ask your own doubt or choose a quick prompt: