Height of a "random" binary search tree

46 Views Asked by At

See also this question, but I'd like to know the simpler case which in that question refers to CLRS 12.4 (looked it up - no formula found!). So, assume you have a list $L=\{1,\dots,n\}$ and an initially empty binary search tree $B$. You insert a random element $e$ of $L$ into $B$ and delete $e$ from $L$. Repeat until $L=\{\}$. Is the height of $B$ at the end really $O(\log n)$? (And the average number of children $2$?) Just for fun, I created a random $n=50$ BST and its height was $10$.