This document discusses binary search trees and AVL trees. It defines a binary search tree as a node-based binary tree that maintains the property that all left descendants of a node are less than the node's value and all right descendants are greater. It then discusses different binary search tree operations like insertion, deletion, and searching. It notes that the time complexity of these operations can vary from O(log n) to O(n) depending on the shape of the tree. The document then introduces AVL trees, which guarantee an O(log n) time complexity through self-balancing after each insertion or deletion using tree rotations to maintain a height balance property. It provides examples of AVL tree rotations for different imbalance cases and shows
Related topics: