Week 5: AVL Trees Flashcards
What ais the time complexity of the following methods for Binary Search Trees?
What is an AVL tree?
What is the maximum height of an AVL tree?
To rebalance an AVL tree, we always…
What are the following rotations?
RR
LL
RL
LR
What does the fix for each look like?
If an AVL tree becomes unbalances due to an INSERTION…
What is the algorithm for
putAVL(r, k, data)
Example of rebalancing a tree
When both a single and double rotation can be applied to an unbalanced subtree…
If the tree becomes unbalanced due to a
removal…
What is the algorithm for
removeAVL(r, k)
For AVL trees:
The data structure takes how much space?
A single rotation takes how much time?
get() takes how much time?
put() takes how much time?
remove() takes how much time?
Another example of
putAVL()