Every reusable C++ struct and function defined in the notes (831 entries) with the note that defines and tests it. Later notes reuse these names (DSU, Fenwick, Mint, LCA, …) without redefining them.

NameKindDefined in
abs_functionPoints, Vectors and Orientation
adaptivefunctionRoot Finding and Integration
addBoundedfunctionKnapsack and Subset Sum
addGroupfunctionKnapsack and Subset Sum
addModfunctionFast I/O and Constant Factor
addUnbfunctionKnapsack and Subset Sum
AffinestructPolygon Clipping and Union
AhoCorasickstructTrie and Aho-Corasick
aliensfunctionAliens Trick
allCollectedByfunctionProbability and Expectation
allPairsMinCutSumfunctionGomory-Hu Tree
alphabetafunctionGame DP, Minimax and Game Search
alphaBetafunctionGame DP, Minimax and Game Search
anglefunctionPoints, Vectors and Orientation
AnglestructCircle Union and Angular Sweep
angleDifffunctionCircle Union and Angular Sweep
angleFromSidesfunctionTriangles
angleLessfunctionPoints, Vectors and Orientation
answerfunctionInteractive Problems
antsTimesfunctionSorting and Ordering Observations
anyIntersectionfunctionSweep Line and Segment Intersections
apFreefunctionSequence and Number Constructions
apIntersectionfunctionNumber Theory Miscellany
applyfunctionTreaps and Balanced BSTs
ArcstructDelaunay and Voronoi
areafunctionPolygons
assignmentDPfunctionAssignment Problem
AStarstructA*, IDA* and Branch and Bound
badCharTablefunctionOther Pattern Matching
ballotPathsfunctionCatalan Numbers and Lattice Paths
BarrettstructBarrett and Montgomery Reduction
batchInversefunctionModular Arithmetic
BeatsstructSegment Tree Beats and Historic Values
bellmanFordfunctionShortest Paths
bellNumbersfunctionCounting Fundamentals
bellSeriesfunctionCounting with Power Series
bentleyOttmannfunctionSweep Line and Segment Intersections
berlekampMasseyfunctionLinear Recurrences
bernoullifunctionCounting with Power Series
bestApproximationfunctionContinued Fractions and Pell Equations
bestUCTfunctionGame DP, Minimax and Game Search
bfs01functionShortest Paths
bidirectionalfunctionMeet in the Middle
BigstructBig Integers and Fractions
binaryGcdfunctionGCD and Extended Euclid
BinaryTriestructBinary Trie
BinomialAnyModstructFactorials and Binomials mod p
binomialPrefixfunctionBinomial Identities
binomialPrefixQueriesfunctionBinomial Identities
binomialResidueSumsfunctionBinomial Identities
binomialSumsAllfunctionComposition and Taylor Shift
binomTopLargefunctionCounting Fundamentals
bipartiteEdgeColoringfunctionGraph Coloring
birthdayNoCollisionfunctionProbability and Expectation
bitapfunctionOther Pattern Matching
BitLCSstructLIS, LCS and Edit Distance
bitLowerBoundfunctionBinary Search
BitsetMatcherstructOther Pattern Matching
BitVecstructRange Order Statistics and Wavelets
BlossomstructGeneral Matching
BNodestructTree Basics, Diameter and Center
boruvkafunctionMinimum Spanning Trees
boundedKnapsackCountsfunctionCounting with Power Series
boundedRskfunctionYoung Tableaux and RSK
boundingFractionsfunctionContinued Fractions and Pell Equations
boyerMooreSearchfunctionOther Pattern Matching
bracketForestfunctionString Basics and Parsing
BracketInfostructString Basics and Parsing
brentfunctionCycles and Functional Graphs
buildfunctionSqrt Decomposition
buildLPSfunctionPrefix Function and Z-Function
buildProductfunctionPower Series Operations
CactusstructSpecial Graph Classes
canonicalfunctionLines and Segments
carmichaelLambdafunctionPrimitive Roots and Discrete Log
ceilDivfunctionModular Arithmetic
ceildivfunctionC++ for Competitive Programming
centroidfunctionTriangles
CentroidTreestructCentroid Decomposition
cfSqrtfunctionContinued Fractions and Pell Equations
characteristicPolynomialfunctionCharacteristic Polynomial
chinesePostmanfunctionEuler Tours
ChordalstructSpecial Graph Classes
chromaticNumberfunctionGraph Coloring
ChromaticPolynomialstructGraph Coloring
cipollafunctionQuadratic Residues and Modular Roots
CirclestructMinimum Enclosing Circle
circleCirclefunctionCircles and Inversion
circleFromfunctionMinimum Enclosing Circle
circleLinefunctionCircles and Inversion
circleUnionAreafunctionCircle Union and Angular Sweep
circulantDeterminantfunctionSparse and Structured Matrices
circumcenterfunctionTriangles
circumradiusfunctionTriangles
ckmaxfunctionC++ for Competitive Programming
ckminfunctionC++ for Competitive Programming
clipfunctionPolygons
clipPolygonfunctionPolygon Clipping and Union
clmulfunctionConvolution Variants
closurefunctionDAGs and Topological Sort
ColorfulMatroidstructMatroid Intersection
combfunctionLIS, LCS and Edit Distance
CombstructModular Arithmetic
complementBFSfunctionBFS, DFS and Grids
composefunctionCounting Fundamentals
composeFastfunctionComposition and Taylor Shift
compositionalInversefunctionComposition and Taylor Shift
compositionalInverseFastfunctionComposition and Taylor Shift
connectedfunctionTop Trees
continuedFractionfunctionContinued Fractions and Pell Equations
convfunctionKnapsack and Subset Sum
convergentsfunctionContinued Fractions and Pell Equations
convexHullfunctionConvex Hull
convexHull3Dfunction3D Geometry and 3D Hull
convexIntersectionAreafunctionPolygon Clipping and Union
convexLayersfunctionConvex Hull
convexMatchingfunctionBipartite Matching
convexPolygonDistancefunctionRotating Calipers
convexTangentsfunctionRotating Calipers
convolution2DfunctionConvolution Variants
convolutionAnyModfunctionFactorials and Binomials mod p
convolutionCRTfunctionFactorials and Binomials mod p
convolutionLLfunctionFactorials and Binomials mod p
coprimeBasisfunctionNumber Theory Miscellany
coprimePairsfunctionArithmetic Functions and Möbius
cornacchiafunctionQuadratic Residues and Modular Roots
CostScalingstructMin-Cost Flow
countArborescencesfunctionMatrix-Tree Theorem
countAtDepthfunctionEuler Tour, Subtree and Path Queries
countBoundedBrutefunctionCounting Fundamentals
countBoundedIndividualfunctionCounting Fundamentals
countBoundedUniformfunctionCounting Fundamentals
countByValuefunctionSubarray Aggregates and Mex
countDiophantinefunctionFactorials and Binomials mod p
countDistinctSubsequencesfunctionSuffix Automaton
countFourCyclesfunctionSpecial Graph Classes
countHamPathsfunctionHamiltonian Paths and TSP
countIntervalsfunctionPermutation Tree
countInvfunctionSorting, Selection and Inversions
countKthPowersfunctionNumber Theory Miscellany
countLessfunctionFast I/O and Constant Factor
countMazePathsfunctionBacktracking and Pruning
countPathsOfLengthfunctionCentroid Decomposition
countProductAtMostfunctionCounting DP Techniques
countResiduesInRangefunctionNumber Theory Miscellany
countSolutionsfunctionLinear Congruences and CRT
countSpanningTreesfunctionMatrix-Tree Theorem
countSquareRootsOfOnefunctionNumber Theory Miscellany
countUnlabelledTreesfunctionTree Isomorphism and Prüfer Codes
countUpTofunctionDigit DP
countXorfunctionCounting DP Techniques
couponAllfunctionProbability and Expectation
CoverstructOffline and 2D Range Queries
coverfunctionExact Cover and Dancing Links
CoverTreestructSweep Line and Segment Intersections
crossfunctionPoints, Vectors and Orientation
crossesfunctionLines and Segments
crtMergefunctionLinear Congruences and CRT
crtModfunctionFactorials and Binomials mod p
cutFromRootfunctionVirtual Tree
CutInfostructMinimum Cut
cycleDecompositionfunctionCounting Fundamentals
cyclicArgmaxfunctionRotating Calipers
cyclotomicfunctionPolynomial Factorization
dayOfWeekfunctionC++ for Competitive Programming
daysBeforefunctionC++ for Competitive Programming
daysInfunctionC++ for Competitive Programming
deBruijnfunctionEuler Tours
decodePermutationfunctionBurnside and Pólya
decomposefunctionFlow Modeling
degreefunctionBacktracking and Pruning
delannoyTablefunctionStirling, Bell and Partition Numbers
densestSubgraphfunctionFlow Modeling
derangementsfunctionStirling, Bell and Partition Numbers
detModfunctionMatrix-Tree Theorem
diameterDPfunctionTree Basics, Diameter and Center
diffConstraintsfunctionShortest Path Techniques
digitAddConvolutionfunctionConvolution Variants
digitMaxConvolutionfunctionConvolution Variants
digitMinConvolutionfunctionConvolution Variants
DigitRingstructConvolution Variants
dijkstrafunctionShortest Paths
DinicstructMaximum Flow
diophantinefunctionLinear Congruences and CRT
directedMSTfunctionDirected MST
DirectedMSTstructDirected MST
discreteLogfunctionPrimitive Roots and Discrete Log
discreteRootsfunctionPrimitive Roots and Discrete Log
DisjointSparseTablestructSparse Table
distfunctionPoints, Vectors and Orientation
DistanceSumstructCentroid Decomposition
distinctfunctionOffline and 2D Range Queries
distinctDiffPermfunctionConstructive Algorithms
distinctInRangesfunctionRange Order Statistics and Wavelets
DistinctOnlinestructRange Order Statistics and Wavelets
distinctPartitionsfunctionStirling, Bell and Partition Numbers
DistinctSubstringsInRangestructSuffix Array and LCP
distPointLinefunctionRotating Calipers
distPointSegmentfunctionRotating Calipers
distSegmentsfunctionRotating Calipers
distToLinefunctionPoints, Vectors and Orientation
distToSegmentfunctionPoints, Vectors and Orientation
divisorCountAndSumfunctionPrimes and Sieves
divisorMobiusfunctionCounting DP Techniques
divisorsfunctionPrimitive Roots and Discrete Log
divisorsFromfunctionPrimality Testing and Factorization
divisorsFromFactorsfunctionPrimitive Roots and Discrete Log
divisorsOffunctionGCD and Extended Euclid
divisorsTrialfunctionPrimitive Roots and Discrete Log
divisorZetafunctionCounting DP Techniques
divmodfunctionPower Series Operations
dominantIndicesfunctionHeavy-Light and Long-Path Decomposition
dominatingColourSumsfunctionSmall to Large (DSU on Tree)
DominatorstructDominator Tree
dominoTilingsfunctionBroken Profile DP
dpllfunctionSatisfiability
DSUstructDisjoint Set Union
DsuOnTreestructSmall to Large (DSU on Tree)
DuSievestructArithmetic Functions and Möbius
duvalfunctionLyndon Words and Minimal Rotation
DyadicstructHackenbush and Partizan Games
DynamicAhoCorasickstructTrie and Aho-Corasick
DynamicBitsetstructOther Pattern Matching
DynamicDiameterstructTree Basics, Diameter and Center
DynamicHullstructDynamic Convex Hull
dynamicMSTfunctionMinimum Spanning Trees
DynamicTreeMISstructDynamic DP
DynSegstructDynamic and Persistent Segment Trees
DynSubmaskstructCounting DP Techniques
earClippingfunctionPolygon Clipping and Union
ECPointstructNumber Theory Miscellany
edf_splitfunctionPolynomial Factorization
EertreestructEertree and Palindromic Factorization
eggDropfunctionClassic DP Problems
elementarySymmetricUpTofunctionMatrix Exponentiation DP
elementwiseMinfunctionFast I/O and Constant Factor
elemSymfunctionCounting DP Techniques
EllipticCurvestructNumber Theory Miscellany
encodePermutationfunctionBurnside and Pólya
eppsteinfunctionK Shortest and Disjoint Paths
equalizeByXorfunctionInvariant-Based Constructions
ErasableHeapstructHeaps
eratosthenesfunctionPrimes and Sieves
eulerianTablefunctionStirling, Bell and Partition Numbers
eulerPhifunctionPrimitive Roots and Discrete Log
EulerTourstructEuler Tour, Subtree and Path Queries
EulerTourTreestructEuler Tour Tree
eulerWalkfunctionEuler Tours
EvstructSweep Line and Segment Intersections
evalPolyfunctionRoot Finding and Integration
evalRecfunctionMultipoint Evaluation and Interpolation
EventstructSweep Line and Segment Intersections
exactGcdPairsfunctionPrimes and Sieves
excenterfunctionTriangles
expectedMaxDicefunctionProbability and Expectation
expectedStepsfunctionProbability and Expectation
ExprParserstructString Basics and Parsing
extendPRecursivefunctionLinear Recurrences
extgcdfunctionGCD and Extended Euclid
extGcdfunctionFactorials and Binomials mod p
extremeVertexfunctionRotating Calipers
EytzingerstructFast I/O and Constant Factor
factorizefunctionPrimality Testing and Factorization
factorizeTrialfunctionPrimitive Roots and Discrete Log
factorRecfunctionPrimality Testing and Factorization
factorXnMinus1functionPolynomial Factorization
faddeevLeVerrierfunctionCharacteristic Polynomial
farthestfunctionTree Basics, Diameter and Center
FastFactorialstructFactorials and Binomials mod p
FastMod32structBarrett and Montgomery Reduction
fastRskfunctionYoung Tableaux and RSK
FastSetstructFast Set and Integer Structures
fastSievefunctionPrimes and Sieves
FenwickstructFenwick Tree
Fenwick2DstructFenwick Tree
FGHstructHarmonic Lemma and Floor Sums
findAllfunctionPrefix Function and Z-Function
findCelebrityfunctionCelebrity Problem
findDirectedCyclefunctionCycles and Functional Graphs
findPRecursivefunctionLinear Recurrences
firstPlayerWinsfunctionCombinatorial Games and Nim
floorDivfunctionModular Arithmetic
floordivfunctionC++ for Competitive Programming
floorFGHfunctionHarmonic Lemma and Floor Sums
floorSumfunctionHarmonic Lemma and Floor Sums
FloorValuesstructHarmonic Lemma and Floor Sums
floydfunctionShortest Paths
footfunctionLines and Segments
forEachPythagoreanfunctionNumber Theory Miscellany
fortunefunctionDelaunay and Voronoi
FracstructContinued Fractions and Pell Equations
fracBinarySearchfunctionContinued Fractions and Pell Equations
from2functionMinimum Enclosing Circle
from3functionMinimum Enclosing Circle
fromBalancedTernaryfunctionModular Arithmetic
fromBinomialBasisfunctionCounting with Power Series
fromFactoradicfunctionBurnside and Pólya
fromNegativeBasefunctionModular Arithmetic
fromNewtonBasisfunctionMultipoint Evaluation and Interpolation
fubinifunctionStirling, Bell and Partition Numbers
FunctionalGraphstructCycles and Functional Graphs
fwhtfunctionBitwise Convolutions
gallaiEdmondsfunctionGeneral Matching
gamblersRuinfunctionProbability and Expectation
garnerfunctionLinear Congruences and CRT
garsiaWachsfunctionKnuth-Yao Optimization
gaussfunctionGeneral Matching
gaussianEliminationfunctionGaussian Elimination, Rank and Inverse
gaussJordanfunctionGaussian Elimination, Rank and Inverse
gcdLcmPairsfunctionArithmetic Functions and Möbius
GeneralMatchingstructGames on Graphs and Matchings
generatefunctionLyndon Words and Minimal Rotation
geographyFirstWinsfunctionGames on Graphs and Matchings
getPathfunctionTop Trees
getSubtreefunctionTop Trees
GF64structConvolution Variants
ggcdfunctionNumber Theory Miscellany
GIstructNumber Theory Miscellany
girthUnweightedfunctionShortest Path Techniques
goldenMinfunctionTernary and Golden-Section Search
gomoryHufunctionGomory-Hu Tree
gquotfunctionNumber Theory Miscellany
GraeffeLevelsstructComposition and Taylor Shift
grahamScanfunctionConvex Hull
GraphCountingstructCounting Graphs and Trees
GraphicMatroidstructMatroid Intersection
grayfunctionGray Code
grayInversefunctionGray Code
greedySetCoverfunctionApproximation Algorithms
gridPathsfunctionCatalan Numbers and Lattice Paths
grundyfunctionSprague-Grundy
guessPermutationfunctionInteractive and Output-Only Constructions
hackenbushfunctionCombinatorial Games and Nim
hafnianfunctionDeterminants and Permanents
halffunctionPoints, Vectors and Orientation
halfPlaneIntersectionfunctionHalf-Plane Intersection
hamiltonianCyclesfunctionBroken Profile DP
hamiltonianPathfunctionHamiltonian Paths and TSP
hanoifunctionTower of Hanoi
HashstructRandomized Algorithms
HashingstructString Hashing
HashMapstructContainers, Hashing and Choosing a Structure
hatGuessesfunctionPrisoners and Hats
havelHakimifunctionGraph Constructions
heavyCoinfunctionCounterfeit Coin and 12 Coins
heronfunctionTriangles
hilbertfunctionMo’s Algorithm
hirschbergfunctionLIS, LCS and Edit Distance
HLDstructHeavy-Light and Long-Path Decomposition
HopcroftKarpstructBipartite Matching
HPstructHalf-Plane Intersection
hullAreafunction3D Geometry and 3D Hull
hullVolume6function3D Geometry and 3D Hull
hungarianfunctionAssignment Problem
incenterfunctionTriangles
inConvexfunctionPolygons
inConvexPolygonfunctionRotating Calipers
IncReachstructDAGs and Topological Sort
incrementalSCCfunctionSCC and 2-SAT
InfostructLIS, LCS and Edit Distance
inPolygonfunctionPolygons
inradiusfunctionTriangles
insertfunctionXOR Basis
insidefunctionMinimum Enclosing Circle
integratefunctionRoot Finding and Integration
interfunctionHalf-Plane Intersection
intersectionPointfunctionLines and Segments
IntervalMapstructChtholly Tree (Interval Map)
inTrianglefunctionPolygons
inversefunctionPower Series Operations
inverseBwtfunctionBurrows-Wheeler Transform
inverseMod2functionGaussian Elimination, Rank and Inverse
inversePermutationfunctionCounting Fundamentals
inversesUpTofunctionModular Arithmetic
invertCirclefunctionCircles and Inversion
invertLinefunctionCircles and Inversion
invertPointfunctionCircles and Inversion
invModfunctionGCD and Extended Euclid
invTablefunctionCounting with Power Series
isBalancedfunctionString Basics and Parsing
isConvexfunctionPoints, Vectors and Orientation
isGraphicalfunctionSpecial Graph Classes
islandfunctionDAG and Expected-Value DP
isLeapfunctionC++ for Competitive Programming
IsomorphicSubstringsstructString Hashing
isPalfunctionPalindromes and Manacher
isPrimefunctionPrimality Testing and Factorization
isPrimeTrialfunctionPrimitive Roots and Discrete Log
isqrtNewtonfunctionRoot Finding and Integration
isRepetitionfunctionString Basics and Parsing
isTangentfunctionConvex Polygon Queries and Tangents
isTournamentScorefunctionSpecial Graph Classes
isWinningCombinedGamefunctionSprague-Grundy
jacobifunctionPrimitive Roots and Discrete Log
josephusfunctionClassic Puzzles
josephusFastfunctionClassic Puzzles
kahnfunctionDAGs and Topological Sort
kangaroofunctionCounting DP Techniques
karatsubafunctionFast Fourier Transform
kargerSteinfunctionGlobal Minimum Cut
kasaifunctionSuffix Array and LCP
KDstructKD-Tree and Spatial Structures
kmpSearchfunctionPrefix Function and Z-Function
knightDistfunctionBFS, DFS and Grids
knightsTourfunctionBacktracking and Pruning
knightsTourOncefunctionKnight’s Tour and N Queens
knuthfunctionKnuth-Yao Optimization
konigCoverfunctionBipartite Matching
kruskalfunctionMinimum Spanning Trees
KSTstructLi Chao and Kinetic Segment Trees
kthCoefficientfunctionMultipoint Evaluation and Interpolation
kthPermutationfunctionCounting Fundamentals
KuhnstructBipartite Matching
kummerCarriesfunctionFactorials and Binomials mod p
kWalksfunctionK Shortest and Disjoint Paths
LadderAncestorstructLowest Common Ancestor
lagrangeAtfunctionCounting with Power Series
lahTablefunctionStirling, Bell and Partition Numbers
largestRectanglefunctionMonotonic Stack
lastOccurrencefunctionRange Order Statistics and Wavelets
LazySegTreestructLazy Propagation
LCAstructLowest Common Ancestor
lcmSafefunctionGCD and Extended Euclid
lcpArrayfunctionBurrows-Wheeler Transform
lcsBitParallelfunctionBitset and Word-Level Parallelism
lcsRowfunctionLIS, LCS and Edit Distance
leastRotationfunctionLyndon Words and Minimal Rotation
legendreExpfunctionFactorials and Binomials mod p
LiChaostructLi Chao and Kinetic Segment Trees
lightsOutfunctionLights Out
LinestructLi Chao and Kinetic Segment Trees
linearCongruencefunctionLinear Congruences and CRT
LinearMatroidstructMatroid Intersection
linearRecurrenceModfunctionLinear Recurrences
LinearSievestructPrimes and Sieves
linearTransformationfunctionCircle Union and Angular Sweep
LineContainerstructConvex Hull Trick
lineDistfunction3D Geometry and 3D Hull
lineHullIntersectionfunctionConvex Polygon Queries and Tangents
lineInterfunctionLines and Segments
lineIntersectfunctionLines and Segments
lineIntersectionfunctionRotating Calipers
linePlaneIntersectionfunction3D Geometry and 3D Hull
linkfunctionTop Trees
LinkCutstructLink-Cut Tree
lisLdsPermfunctionPermutation Constructions
LNodestructHeaps
logSeriesfunctionPower Series Operations
longestPalindromefunctionPalindromes and Manacher
LongPathstructHeavy-Light and Long-Path Decomposition
loopyGrundyfunctionLoopy Games and Retrograde Analysis
loopyOutcomefunctionLoopy Games and Retrograde Analysis
loopySumOutcomefunctionLoopy Games and Retrograde Analysis
LowerBoundFlowstructFlow Modeling
LowlinkstructBridges and Biconnectivity
LPSolverstructLinear Programming
LucasPstructFactorials and Binomials mod p
LucystructSublinear Sieves and Prime Counting
magicSquarefunctionGrid and Matrix Constructions
makefunctionTreaps and Balanced BSTs
ManacherstructPalindromes and Manacher
matchBracketsfunctionString Basics and Parsing
matchingfunctionGeneral Matching
MatchingClassifierstructBipartite Matching
matchingSizefunctionGeneral Matching
MatrixstructMatrices and Matrix Power
matrix_powerfunctionMatrices and Matrix Power
maxAntichainfunctionBipartite Matching
maxClosurefunctionFlow Modeling
maxCollinearfunctionPoint Location and Point Counting
maxPointsInCirclefunctionCircle Union and Angular Sweep
maxProfitfunctionClassic DP Problems
maxWeightMatchingDPfunctionWeighted General Matching
MCMFstructMin-Cost Flow
mctsfunctionGame DP, Minimax and Game Search
MDSTstructMinimum Spanning Trees
medianLengthfunctionTriangles
meldfunctionHeaps
mergefunctionClassic Array Problems
MergeSegstructSegment Tree Merging and Splitting
mexToZerofunctionWhen the Answer Is Small
minBoundingRectanglefunctionRotating Calipers
MinCostBFlowstructMin-Cost Flow
minimizeDFAfunctionAutomata and Formal Languages
minCostNonDecreasingfunctionSlope Trick
minDiameterTreefunctionMinimum Spanning Trees
minEnclosingCirclefunctionMinimum Enclosing Circle
minkowskifunctionMinkowski Sum
minkowskiSumfunctionRotating Calipers
minMeanCyclefunctionShortest Path Techniques
minOpsFromOnefunctionObservation Toolkit
minPalCutsfunctionClassic DP Problems
minPalindromicFactorizationfunctionEertree and Palindromic Factorization
minPathCoverfunctionFlow Modeling
minPlusConvexArbitraryfunctionConvolution Variants
minPlusConvexConvexfunctionConvolution Variants
MinPlusMatrixstructMatrices and Matrix Power
minStepsfunctionWater Jug
MIntstructFactorials and Binomials mod p
mintSqrtfunctionCounting with Power Series
misereWinsfunctionCombinatorial Games and Nim
MisOpsstructTop Trees
MonoCHTstructConvex Hull Trick
monotoneChainfunctionConvex Hull
Montgomery64structBarrett and Montgomery Reduction
mooreLosesfunctionCombinatorial Games and Nim
moRollbackfunctionMo’s Algorithm
morrisInorderfunctionTree Basics, Diameter and Center
motzkinfunctionStirling, Bell and Partition Numbers
mul2DfunctionComposition and Taylor Shift
mulmfunctionPrimality Testing and Factorization
mulModfunctionPrimitive Roots and Discrete Log
mulmod64functionBarrett and Montgomery Reduction
mulOverflowsfunctionModular Arithmetic
mulSlowfunctionModular Arithmetic
multipleMobiusfunctionCounting DP Techniques
multipleZetafunctionCounting DP Techniques
multiplicativeOrderfunctionPrimitive Roots and Discrete Log
multiplyfunctionMatrices and Matrix Power
multiplyBigfunctionFast Fourier Transform
multiplyNTTfunctionNumber-Theoretic Transform
muUpTofunctionArithmetic Functions and Möbius
narayanaTablefunctionStirling, Bell and Partition Numbers
NearestMarkedstructCentroid Decomposition
negamaxfunctionGame DP, Minimax and Game Search
negascoutfunctionGame DP, Minimax and Game Search
negativeCyclefunctionShortest Paths
NetworkSimplexstructMin-Cost Flow
newtonfunctionRoot Finding and Integration
noAdjacentConsecutivefunctionPermutation Constructions
NodestructClassic Array Problems
numberGamefunctionHackenbush and Partizan Games
offlineArgminfunctionRange Minimum Query
OfflineConnectivitystructDynamic Connectivity
offlineLCAfunctionLowest Common Ancestor
oneD1DfunctionMonotone Queue, 1D1D and SMAWK
OnlineBridgesstructBridges and Biconnectivity
OnlineMSFstructLink-Cut Tree
onRangefunctionTreaps and Balanced BSTs
onSegmentfunctionPoints, Vectors and Orientation
optimalCutofffunctionSecretary Problem
OrderStatFenwickstructCounting Fundamentals
ordinalfunctionC++ for Competitive Programming
orientfunctionPoints, Vectors and Orientation
orient3function3D Geometry and 3D Hull
orthocenterfunctionTriangles
outsidefunctionHalf-Plane Intersection
P3struct3D Geometry and 3D Hull
pairsDisjointfunctionDigit DP
PalindromesInRangestructPalindromes and Manacher
partition3functionSorting, Selection and Inversions
partitionNumbersfunctionCounting Fundamentals
partitionSeriesfunctionCounting with Power Series
partitionsIntoPartsfunctionStirling, Bell and Partition Numbers
pascalfunctionCounting Fundamentals
PathAddSubtreeSumstructEuler Tour, Subtree and Path Queries
pathsAvoidingfunctionCatalan Numbers and Lattice Paths
pathsBetweenLinesfunctionCatalan Numbers and Lattice Paths
patternContainmentfunctionOther Pattern Matching
patternWaitingTimefunctionProbability and Expectation
pellFundamentalfunctionContinued Fractions and Pell Equations
permanentfunctionDeterminants and Permanents
permutantDeterminantfunctionSparse and Structured Matrices
PermutationGroupstructBurnside and Pólya
permutationRankfunctionCounting Fundamentals
permutationRootfunctionBurnside and Pólya
permutationSortfunctionWhen the Answer Is Small
PermutationTreestructPermutation Tree
permutationXorValuesfunctionDeterminants and Permanents
permWithInversionsfunctionPermutation Constructions
perpfunctionPoints, Vectors and Orientation
PersistentCentroidstructCentroid Decomposition
phiOffunctionArithmetic Functions and Möbius
phiUpTofunctionArithmetic Functions and Möbius
planarFacesfunctionPlanar Graphs and Faces
Planestruct3D Geometry and 3D Hull
pohligHellmanfunctionPrimitive Roots and Discrete Log
PointstructTriangles
Point3struct3D Geometry and 3D Hull
polarLessfunctionTriangles
pollardfunctionPrimality Testing and Factorization
pollardPm1functionPrimitive Roots and Discrete Log
pollardRhofunctionPrimitive Roots and Discrete Log
PolystructMultipoint Evaluation and Interpolation
PolyEuclidstructPolynomial GCD and Resultant
polyGcdfunctionSparse and Structured Matrices
polygonUnionAreafunctionPolygon Clipping and Union
polyInverseModfunctionPolynomial GCD and Resultant
polyModfunctionSparse and Structured Matrices
polyMulfunctionLinear Recurrences
polyMulModfunctionLinear Recurrences
polyRootsfunctionRoot Finding and Integration
polyStripfunctionSparse and Structured Matrices
posetMobiusfunctionInclusion-Exclusion and Derangements
pourStepsfunctionWater Jug
powCapfunctionArithmetic Functions and Möbius
powerfunctionMatrix Exponentiation DP
powerProjectionfunctionComposition and Taylor Shift
powerSumsfunctionCounting with Power Series
PowerTowerstructNumber Theory Miscellany
powmfunctionPrimality Testing and Factorization
powModfunctionPrimitive Roots and Discrete Log
precomputefunctionCounting Fundamentals
prefixFunctionfunctionPrefix Function and Z-Function
primDensefunctionMinimum Spanning Trees
primeFactorsOffunctionPrimitive Roots and Discrete Log
primeTwoSquaresfunctionQuadratic Residues and Modular Roots
primitiveRootPrimefunctionPrimitive Roots and Discrete Log
printfunctionBig Integers and Fractions
projectionfunctionRotating Calipers
properIntersectfunctionPoints, Vectors and Orientation
pruferDecodefunctionTree Isomorphism and Prüfer Codes
pruferEncodefunctionTree Isomorphism and Prüfer Codes
PSegstructDynamic and Persistent Segment Trees
PSTstructPersistent Data Structures
pullfunctionTreaps and Balanced BSTs
pushfunctionTreaps and Balanced BSTs
PushRelabelstructPush-Relabel
QBinomialstructStirling, Bell and Partition Numbers
qBinomialTablefunctionStirling, Bell and Partition Numbers
queensfunctionBacktracking and Pruning
queryfunctionSqrt Decomposition
QueueUndostructOffline Techniques
rabinKarpfunctionOther Pattern Matching
RadixHeapstructHeaps
radixSortfunctionTheoretical Algorithms Catalog
RangeFenwickstructFenwick Tree
RangeGraphstructShortest Path Techniques
RangeLISstructRange LIS
rankfunctionGaussian Elimination, Rank and Inverse
rankF2functionGaussian Elimination, Rank and Inverse
rankMod2functionGaussian Elimination, Rank and Inverse
rankOneDeterminantfunctionSparse and Structured Matrices
reachableByKSwapsfunctionOperations and Reachable States
readIntfunctionFast I/O and Constant Factor
rectangleFitsfunctionRotating Calipers
rectangleUnionAreafunctionSweep Line and Segment Intersections
rectangleUnionPerimeterfunctionSweep Line and Segment Intersections
rectSumfunctionOffline and 2D Range Queries
ReedsSloanestructLinear Recurrences
reedsSloanefunctionLinear Recurrences
reflectAcrossfunctionPoints, Vectors and Orientation
reflectionfunctionRotating Calipers
RelaxedConvolutionstructOnline Convolution
removefunctionKnapsack and Subset Sum
remUnbfunctionKnapsack and Subset Sum
ReplacementPathsstructShortest Path Techniques
rerootfunctionTree DP and Rerooting
rerootedSubtreefunctionEuler Tour, Subtree and Path Queries
reservoirfunctionRandomized Algorithms
residueDistfunctionKnapsack and Subset Sum
resultantfunctionSparse and Structured Matrices
retrogradefunctionLoopy Games and Retrograde Analysis
reversalsToAlternatefunctionAd Hoc on Arrays and Strings
riverCrossingfunctionRiver Crossings
RollbackDSUstructDisjoint Set Union
RootedTreestructTree Basics, Diameter and Center
rootsModPfunctionPolynomial Factorization
rotatefunctionTreaps and Balanced BSTs
roundDivfunctionNumber Theory Miscellany
rskShapefunctionYoung Tableaux and RSK
runsfunctionRuns and Periodicity
saDoublingfunctionBurrows-Wheeler Transform
safefunctionWolf Goat Cabbage
SafeHashstructC++ for Competitive Programming
saIsfunctionBurrows-Wheeler Transform
SAMstructSuffix Automaton
samplingShiftfunctionComposition and Taylor Shift
saNaivefunctionBurrows-Wheeler Transform
scaleTofunctionPoints, Vectors and Orientation
SCCstructSCC and 2-SAT
SchieberVishkinstructLowest Common Ancestor
schroderfunctionStirling, Bell and Partition Numbers
searchfunctionA*, IDA* and Branch and Bound
seaweedBraidfunctionRange LIS
secondBestMSTfunctionMinimum Spanning Trees
SegstructSweep Line and Segment Intersections
SegmentstructSweep Line and Segment Intersections
segmentAnglesfunctionCircle Union and Angular Sweep
segmentBelowfunctionPoint Location and Point Counting
segmentDistfunction3D Geometry and 3D Hull
segmentedSievefunctionPrimes and Sieves
segmentInPolygonfunctionPolygons
segmentIntersectionfunctionRotating Calipers
segmentsIntersectfunctionLines and Segments
segToSegfunctionPoints, Vectors and Orientation
SegTreestructSegment Tree
SeriesFactorialsstructCounting with Power Series
SetHashingstructRandomized Algorithms
shermanMorrisonfunctionSparse and Structured Matrices
shiftOrfunctionOther Pattern Matching
sidonSetfunctionSequence and Number Constructions
signaturefunctionCounting DP Techniques
simpfunctionRoot Finding and Integration
simplestfunctionBig Integers and Fractions
simplestBetweenfunctionNumber Theory Miscellany
simpsonfunctionRoot Finding and Integration
simulatedAnnealingfunctionHeuristic Optimization
slidingSolvablefunctionParity, Coloring and Mod Observations
SlopeTrickstructSlope Trick
smallestFromPatternfunctionGreedy Constructions
smallestPeriodfunctionString Basics and Parsing
smallestRotationfunctionLyndon Words and Minimal Rotation
smallestWithDivisorsfunctionArithmetic Functions and Möbius
smallestWithZerosfunctionFactorials and Binomials mod p
smawkfunctionMonotone Queue, 1D1D and SMAWK
solvablefunctionA*, IDA* and Branch and Bound
solvefunctionDivide and Conquer
solveSudokufunctionBacktracking and Pruning
sparseCertificatefunctionGlobal Minimum Cut
sparseExpfunctionCounting with Power Series
sparseInvfunctionCounting with Power Series
sparseLogfunctionCounting with Power Series
sparsePowfunctionCounting with Power Series
sparsePowUnitfunctionCounting with Power Series
sparseSqrtfunctionCounting with Power Series
SparseTablestructSparse Table
splayfunctionTreaps and Balanced BSTs
splitfunctionTreaps and Balanced BSTs
sqrtModfunctionQuadratic Residues and Modular Roots
sqrtModPrimePowerfunctionQuadratic Residues and Modular Roots
squarefreeCountfunctionSublinear Sieves and Prime Counting
stableRoommatesfunctionStable Matching
StaticTopTreestructTop Trees
sternBrocotAncestorfunctionContinued Fractions and Pell Equations
sternBrocotDecodefunctionContinued Fractions and Pell Equations
sternBrocotDepthfunctionContinued Fractions and Pell Equations
sternBrocotEncodefunctionContinued Fractions and Pell Equations
sternBrocotLcafunctionContinued Fractions and Pell Equations
sternBrocotRangefunctionContinued Fractions and Pell Equations
sternBrocotWalkfunctionContinued Fractions and Pell Equations
stickyProductfunctionRange LIS
stickyRecfunctionRange LIS
stirling1ColumnfunctionCounting with Power Series
stirling1RowfunctionCounting with Power Series
stirling1TablefunctionStirling, Bell and Partition Numbers
stirling2functionStirling, Bell and Partition Numbers
stirling2ColumnfunctionCounting with Power Series
stirling2RowfunctionCounting with Power Series
stirling2TablefunctionStirling, Bell and Partition Numbers
stirlingColumnfunctionCounting with Power Series
stirlingSecondKindfunctionCounting Fundamentals
stNumberingfunctionBridges and Biconnectivity
stoerWagnerfunctionGlobal Minimum Cut
strangePrinterfunctionInterval DP
StringHashstructString Hashing
strongOrientationfunctionBridges and Biconnectivity
subarrayGcdCountsfunctionGCD and Extended Euclid
SubsequenceAutomatonstructSuffix Automaton
subsetConvfunctionSubmasks, Supermasks and SOS DP
subsetSumfunctionMeet in the Middle
subsetSumCountsfunctionCounting with Power Series
subsetSumsfunctionBitset and Word-Level Parallelism
successProbabilityfunction100 Prisoners
suffixArrayfunctionSuffix Array and LCP
suffixArrayLinearfunctionBurrows-Wheeler Transform
sumExpTimesPolyfunctionCounting with Power Series
sumExpTimesPolyLimitfunctionCounting with Power Series
sumFloorDivfunctionHarmonic Lemma and Floor Sums
sumModfunctionHarmonic Lemma and Floor Sums
sumSigmaModfunctionArithmetic Functions and Möbius
sumSubarrayMinsfunctionContribution and Complementary Counting
SWAGstructTwo Pointers and Sliding Window
syntheticfunctionPower Series Operations
tablefunctionObservation Toolkit
tangentPointsfunctionConvex Polygon Queries and Tangents
taylorShiftfunctionComposition and Taylor Shift
taylorShiftByfunctionComposition and Taylor Shift
ternaryMinfunctionTernary and Golden-Section Search
thomasfunctionSparse and Structured Matrices
threeEdgeCCfunctionBridges and Biconnectivity
to_strfunctionC++ for Competitive Programming
toBalancedTernaryfunctionModular Arithmetic
toBinomialBasisfunctionCounting with Power Series
toFactoradicfunctionBurnside and Pólya
toNegativeBasefunctionModular Arithmetic
toNewtonBasisfunctionMultipoint Evaluation and Interpolation
TopKstructHeaps
TopTreeNodestructTop Trees
tourfunctionBacktracking and Pruning
tournamentPathfunctionHamiltonian Paths and TSP
towerfunctionArithmetic Functions and Möbius
trailingZerosBasefunctionFactorials and Binomials mod p
transitiveClosurefunctionBitset and Word-Level Parallelism
trapfunctionMonotonic Stack
TreeCanonstructTree Isomorphism and Prüfer Codes
treeCentersfunctionTree Basics, Diameter and Center
treeCentroidsfunctionTree Basics, Diameter and Center
TreeHashstructTree Isomorphism and Prüfer Codes
treeKnapfunctionTree DP and Rerooting
Treewidth2structSpecial Graph Classes
treeWithDiameterfunctionGraph Constructions
TrianglePointCounterstructPoint Location and Point Counting
TriestructTrie and Aho-Corasick
TrieNodestructTrie and Aho-Corasick
TrygubNumberstructModular Arithmetic
twoColourfunctionBipartite Graphs
TwoSatstructSCC and 2-SAT
twoSquaresfunctionQuadratic Residues and Modular Roots
uncoverfunctionExact Cover and Dancing Links
unitefunctionTreaps and Balanced BSTs
UpdstructMo’s Algorithm
updatefunctionSqrt Decomposition
UpperHullstructDynamic Convex Hull
vandermondeDeterminantfunctionSparse and Structured Matrices
vandermondeInversefunctionSparse and Structured Matrices
VeniceHeapstructHeaps
vertexConnectivityfunctionMinimum Cut
vertexCover2functionApproximation Algorithms
virtualTreefunctionVirtual Tree
viterbifunctionDAG and Expected-Value DP
vizingfunctionGraph Coloring
volume6function3D Geometry and 3D Hull
WaveletMatrixstructRange Order Statistics and Wavelets
WaveletTreestructPalindromes and Manacher
WeightedBlossomstructWeighted General Matching
WeightedDSUstructDisjoint Set Union
weightedMatroidIntersectionfunctionMatroid Intersection
welzlfunctionMinimum Enclosing Circle
wildcardMatchfunctionOther Pattern Matching
wildcardScoresfunctionOther Pattern Matching
winningMovefunctionCombinatorial Games and Nim
withoutfunctionPrefix Sums and Difference Arrays
wordSearchfunctionBacktracking and Pruning
writeIntfunctionFast I/O and Constant Factor
wythoffLosesfunctionCombinatorial Games and Nim
XorBasisstructXOR Basis
XorWalksstructShortest Path Techniques
zFunctionfunctionPrefix Function and Z-Function
zMatchfunctionRuns and Periodicity
zSearchfunctionPrefix Function and Z-Function