The following numbers are inserted into an empty binary search tree in the given order: 11, 2, 4, 5, 15, 13, 16. What is the height of this binary search tree?
Assume the height of a tree is the number of edges on the longest downward path between the root and a leaf.
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.
They would get inserted as follows:
So, the longest one is:
1 1 → 2 → 4 → 5
So, its height is 3