Concepts25

πŸ—‚οΈData StructureAdvanced

Top Tree

Top trees are dynamic tree data structures that represent a forest as a hierarchy of clusters, allowing O(log n) amortized time for link, cut, path queries/updates, and many subtree queries.

#top tree#dynamic tree#link cut+12
πŸ—‚οΈData StructureAdvanced

Kinetic Tournament Tree

A kinetic tournament tree maintains the minimum (or maximum) of moving values whose pairwise order can change over time.

#kinetic data structure#tournament tree#certificate+12
πŸ—‚οΈData StructureAdvanced

Aho-Corasick - DP Applications

Aho–Corasick (AC) turns a set of forbidden patterns into a finite automaton that lets you process or generate strings while tracking whether any pattern appears.

#aho-corasick#automaton dp#forbidden substrings+12
πŸ—‚οΈData StructureAdvanced

Li Chao Tree

A Li Chao tree maintains a set of lines y = m x + b and answers minimum (or maximum) value queries at a given x in O(log C) time, where C is the numeric range of x.

#li chao tree#dynamic convex hull#segment tree lines+12
πŸ—‚οΈData StructureAdvanced

Palindromic Tree (Eertree)

A Palindromic Tree (Eertree) stores every distinct palindromic substring of a string as a node and can be built online in linear time.

#palindromic tree#eertree#palindromic substrings+12
πŸ—‚οΈData StructureAdvanced

Suffix Automaton - Advanced Usage

A suffix automaton (SAM) is a compact DFA that captures all distinct substrings of a string and supports many advanced queries in linear time.

#suffix automaton#endpos#suffix link+12
πŸ—‚οΈData StructureAdvanced

Suffix Automaton

A suffix automaton (SAM) is the minimal deterministic finite automaton that recognizes all substrings of a string, built online in O(n) time and space.

#suffix automaton#endpos equivalence#suffix link+12
πŸ—‚οΈData StructureAdvanced

Aho-Corasick Automaton

Aho–Corasick is a trie with failure links that finds all occurrences of many patterns in a single pass over the text.

#aho-corasick#multi-pattern matching#trie+12
πŸ—‚οΈData StructureAdvanced

Suffix Array - LCP Array Applications

The LCP (Longest Common Prefix) array, built alongside a suffix array, unlocks fast solutions to problems like longest repeated substring, number of distinct substrings, and longest common substring.

#suffix array#lcp array#kasai algorithm+12
πŸ—‚οΈData StructureAdvanced

Euler Tour Tree

An Euler Tour Tree represents each rooted tree as a DFS open/close sequence so that every subtree is a single contiguous interval.

#euler tour tree#implicit treap#dynamic forest+11
πŸ—‚οΈData StructureAdvanced

Suffix Array

A suffix array stores the starting indices of all suffixes of a string in lexicographic order.

#suffix array#lcp array#kasai algorithm+11
πŸ—‚οΈData StructureAdvanced

Link-Cut Tree

A Link-Cut Tree (LCT) maintains a dynamic forest and supports link, cut, and path queries in O(log n) amortized time.

#link-cut tree#dynamic tree#splay tree+12