Learning Outcomes
At the end of this lecture, you’ll be able to:
- Explain and trace the balancing operations of a Treap.
- Explain the role of the priorities in rebalancing and the importance of being random.
- Select the appropriate rotation type in order to rebalance a Treap after an operation (insert, remove) is performed.
- Implement the core operations of an OrderedMap efficiently with a Treap.
- Analyze the time/space efficiency of a Treap implementation approach for a Map.
Lecture Plan
In this lecture, we'll cover the following lessons:
- Random BST: Shuffling the Keys
- Random BST: Treap⚡
- Treap: Insertion
- Treap Insertion: Exercise⚡
- Treap: Deletion
- Treap Deletion: Exercise⚡
- Treap: Analysis
Lessons marked with ⚡ contain exercise/activity.