The binary tree above has a height of 2 (the number of rows excluding the top) and can index 4 items on the bottom row as shown.
What's the minimum height in a binary tree such that it can index 1000 items on the bottom row?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Each row multiplies the number of nodes in the previous node by 2.
At a height of 0, there is 2 0 = 1 node.
At a height of 1, there are 2 1 = 2 nodes.
At a height of 2 (as shown in the picture), there are 2 2 = 4 nodes.
In general, for a height of n , there are 2 n nodes in the bottom row. Since 2 1 0 = 1 0 2 4 > 1 0 0 0 the minimum height needed is 10.