Average Height of a binary tree

From: Pea Buddy (pea_at_hotmail.com)
Date: 02/07/04


Date: Sat, 07 Feb 2004 19:49:44 GMT

In the book, "Introduction To Algorithms" by Cormen, Leiserson, Rivest, it
says that the average height of a randomly built binary search tree on n
distinct keys is O(lg n). pg.258. However, If you have 7 nodes for example,
lg 7 is 2.8. But that is impossible since the shortest height would is 3.
What is wrong?

lg n = log_base2 n