Binary Search Trees: Balance: Daniel Kane
Binary Search Trees: Balance: Daniel Kane
Balance
Daniel Kane
Department of Computer Science and Engineering
University of California, San Diego
Data Structures
Data Structures and Algorithms
Learning Objectives
Think about the runtime of basic binary
tree operations.
Understand the motivation behind
binary search tree balance.
Implement a rotation.
Outline
1 Runtime
2 Balanced Trees
3 Rotations
Runtime
1 Runtime
2 Balanced Trees
3 Rotations
Example II
1 Runtime
2 Balanced Trees
3 Rotations
Rebalancing