Complex / advanced data structures

Lessons in this group, roughly in build order:

  • complex-data-structures — The specialized structures — union-find, Fenwick/segment trees, balanced trees, tries, suffix structures —…
  • disjoint-set-union-find — A forest-of-parents structure that tracks a partition of n elements into disjoint sets, supporting find…
  • fenwick-trees — A Fenwick tree (binary indexed tree, BIT) is a flat array that answers prefix-sum queries and point…
  • segment-trees — A binary tree over array index ranges where each node stores an aggregate (sum, min, max, gcd…) of its…
  • suffix-arrays — A suffix array is the sorted order of all suffixes of a string, stored as an array of their starting…
  • suffix-trees — A suffix tree is a compressed trie of all suffixes of a string, where every path from the root spells a…