Concepts105

⚙️AlgorithmAdvanced

NTT (Number Theoretic Transform)

The Number Theoretic Transform (NTT) is an FFT-like algorithm that performs discrete convolutions exactly using modular arithmetic instead of floating-point numbers.

#ntt#number theoretic transform#polynomial multiplication+11
⚙️AlgorithmAdvanced

FFT (Fast Fourier Transform)

FFT converts a polynomial from coefficients to values at the n-th roots of unity in O(n log n) time, enabling fast multiplication via pointwise products.

#fft#polynomial multiplication#convolution+11
⚙️AlgorithmAdvanced

CDQ Divide and Conquer

CDQ divide and conquer is an offline technique that splits the timeline (or one coordinate) and lets updates from the left half contribute to queries in the right half.

#cdq divide and conquer#offline algorithm#fenwick tree+11
⚙️AlgorithmAdvanced

Mo's Algorithm - With Updates

Mo's algorithm with updates treats array modifications as a third dimension called time and answers range queries on the correct version of the array.

#mo's algorithm with updates#time dimension#offline range queries+11
⚙️AlgorithmAdvanced

Half-Plane Intersection

Half-plane intersection (HPI) computes the common region that satisfies many linear side-of-line constraints in the plane.

#half-plane intersection#computational geometry#convex polygon+12
⚙️AlgorithmAdvanced

Minkowski Sum

The Minkowski sum A ⊕ B adds every point of set A to every point of set B, and for convex polygons it can be computed in O(n + m) by merging edge directions.

#minkowski sum#convex polygon#edge merge+12
⚙️AlgorithmAdvanced

DSU on Tree (Sack)

DSU on Tree (also called the Sack technique) answers many subtree queries in O(n \log n) by keeping data from the heavy child and temporarily re-adding light subtrees.

#dsu on tree#sack technique#subtree queries+12
⚙️AlgorithmAdvanced

Rectangle Union Area

The union area of many axis-aligned rectangles can be computed efficiently using a sweep line over x and a segment tree tracking covered y-length.

#rectangle union area#line sweep#segment tree+12
⚙️AlgorithmAdvanced

Suffix Array Construction

A suffix array stores the starting indices of all suffixes of a string in lexicographic order, enabling fast substring queries and many string operations.

#suffix array#lcp array#kasai+12
⚙️AlgorithmAdvanced

Lyndon Factorization

A Lyndon word is a string that is strictly smaller (lexicographically) than all of its nontrivial rotations.

#lyndon word#duval algorithm#booth algorithm+12
⚙️AlgorithmAdvanced

Broken Profile DP

Broken Profile DP is a dynamic programming technique that sweeps a grid one cell or one column at a time while encoding the boundary between processed and unprocessed cells as a compact state.

#broken profile dp#profile dp#plug dp+11
⚙️AlgorithmAdvanced

Slope Trick

Slope Trick is a technique to maintain a convex piecewise-linear function implicitly using two heaps and a running constant.

#slope trick#convex dp#piecewise linear+11