Question: Show that if the average depth of an n-node binary search tree is (log n) then the height of the tree is O(n log n).
Show that if the average depth of an n-node binary search tree is (log n) then the height of the tree is O(n log n). Next demonstrate that this bound is tight: there is a binary search tree with average node depth (log n) and height ( n log n).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
