What is the height of a binary heap?
Theta(log(n))
How does Insertion work for a heap?
Insert at the next available leaf
Fix up until Heap Order property is upheld
What is the complexity of Heap Insertion?
O(log(n))
How does deleteMax for for a Heap?
Replace the root by the last leaf
FixDown
What is the complexity of deleteMax
O(log(n))
What is the height of a AVL tree?
Theta(log(n))
What is the complexity of AVL Insert?
BSTInsert -> Theta(log(n))
Update heights above => Theta(log(n))
Rotate if needed => constant
What is the complexity of AVLDelete
BSTDelete => Theta(log(n))
Updates heights above => Theta(log(n))
Rotate if needed => constant