Balanced BST

are height-balanced trees that ensures nearly half of the data is located in each subtree

BST Rotations

AVL Tree

AVL Insert

  1. Insert at proper place
  2. Check for imbalance
  3. Rotate, if necessary
  4. Update height

Untitled

Untitled

AVL Remove

Untitled

B-Tree

B-Tree Insert