BST Performance
Time for put(), get(),
update(), remove() is O(h)
where h is the height of the
tree
How bad can h be?
Operations are fast if tree is
balanced
How balanced is a random
tree?
If items are inserted in
random order then the
expected height of a BST is
O(log n) where n is the
number of items
If deletion is allowed
Tree is no longer random
Tree is likely to become
unbalanced
CS409 - Spring 2000
4