Question discussion

What is the minimum possible height (in edges) of a binary tree that contains 25 nodes?

2183Medium DSSSB TGT Computer Science 0 replies 2 views
0

What is the minimum possible height (in edges) of a binary tree that contains 25 nodes?

  • A3
  • B5
  • C4
  • D12
Correct answer: C

Explanation

A binary tree of height h holds at most 2^(h+1) − 1 nodes; height 3 gives only 15 nodes while height 4 allows up to 31, so 4 is the minimum.

Discussion 0

Nobody has replied yet. Start the discussion!