Skip to content

Trees

  • Binary trees: traversals (inorder, preorder, postorder, level-order), height, depth
  • Binary search trees (BST): search, insert, delete, successor/predecessor
  • Balanced BSTs: AVL trees (rotations), red-black trees (colour invariants)
  • B-trees and B+ trees: disk-friendly, database indexing, order and fill factor
  • Tries: prefix trees, autocomplete, word search
  • Segment trees: range queries, lazy propagation
  • Fenwick trees (Binary Indexed Trees): prefix sums, point updates
  • Union-Find (Disjoint Set Union): path compression, union by rank