59.5k views
4 votes
What is the smallest number of levels required to store 100,000 nodes in a binary tree? Can I see the work too please?

1 Answer

5 votes

Answer:

17

Step-by-step explanation:

For a binary tree with h levels, the maximum number of nodes is 2ʰ − 1.

2ʰ − 1 ≥ 100,000

2ʰ ≥ 100,001

h ≥ log₂ 100,001

h ≥ 16.6

The smallest number of levels required to store 100,000 nodes is 17.

User Trenin
by
5.7k points