Discussion
A complete binary tree with 4 levels has a maximum of how many nodes ?
Answer: A
A binary tree with 4 levels has at most 15 nodes.
Level i (counting the root as level 1) can hold at most \(2^{i-1}\) nodes, so a full tree of h levels has:
\[ \begin{aligned} N &= 1 + 2 + 4 + 8 \\ &= 2^{4} - 1 = 15 \end{aligned} \]
16 is \(2^{4}\), forgetting the minus one. 31 is the count for 5 levels, and 14 falls one short.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development