Algorithms & DP

Algorithms & DP

Algorithms & Dynamic Programming — animated visualizations, DP tables, recursion trees, complexity walkthroughs.

804Articles
804Topics covered
Articles in this category

All 804 articles, sorted alphabetically

Advertisement
ARTICLE · 01

2-Edge-Connected Components + Bridge Tree

Group vertices connected without using bridges. Tree structure of bridges.

Read article
ARTICLE · 02

A* Algorithm

Add h(n) estimate to guide search. Optimal + admissible = optimal path.

Read article
ARTICLE · 03

A* Pathfinding

Optimal shortest path with heuristic guidance. Basis of game AI + robotics.

Read article
ARTICLE · 04

A* Variants

Memory-bounded, anytime, and dynamic replanning A* variants.

Read article
ARTICLE · 05

Activity Selection

Sort by end time + take non-conflicting activities. Provable optimality.

Read article
ARTICLE · 06

AES-GCM

Counter-mode AES + GHASH universal hash. Parallel + hardware accelerated.

Read article
ARTICLE · 07

AES

Rijndael, 128/192/256-bit keys, 10/12/14 rounds. Backbone of modern symmetric crypto.

Read article
ARTICLE · 08

Aho-Corasick

Trie + failure links = search for many patterns in text in linear time.

Read article
ARTICLE · 09

2D Geometry Algorithms

Foundational 2D geometry algorithms: orientation, distance, intersection, area.

Read article
ARTICLE · 10

2-SAT

How 2-SAT (SAT with 2-variable clauses) is solvable in polynomial time via SCC.

Read article
ARTICLE · 11

3-SAT Reduction

3-SAT: canonical NP-hard SAT variant.

Read article
ARTICLE · 12

A* Search Deep Dive

A* pathfinding: f(n) = g(n) + h(n).

Read article
ARTICLE · 13

A* Variants

The variants of A* for different constraints: memory-bounded, anytime, weighted.

Read article
ARTICLE · 14

Accounting Method for Amortized

Accounting amortized analysis.

Read article
ARTICLE · 15

AES Deep Dive

AES: symmetric block cipher.

Read article
ARTICLE · 16

Aggregate Method for Amortized

Aggregate amortized analysis.

Read article
ARTICLE · 17

Aho-Corasick Algorithm

Aho-Corasick multi-pattern search.

Read article
ARTICLE · 18

Alias Method

Alias method: sample from discrete distribution in O(1).

Read article
ARTICLE · 19

Alpha-Beta Pruning

Alpha-beta pruning for minimax.

Read article
ARTICLE · 20

Amortized Analysis

Amortized analysis: average per-operation cost.

Read article
ARTICLE · 21

ANS Coding

Asymmetric Numeral Systems.

Read article
ARTICLE · 22

Approximation Algorithms

How approximation algorithms give provable bounds on optimal solutions to NP-hard problems.

Read article
ARTICLE · 23

APX-Hard Problems

APX-hardness: problems with no PTAS.

Read article
ARTICLE · 24

ARC architecture

Deep-dive on ARC, the Adaptive Replacement Cache that beats LRU and LFU by adapting the recency-versus-frequency balance automatically per workload, w…

Read article
ARTICLE · 25

Argon2

Argon2: modern memory-hard password hash.

Read article
ARTICLE · 26

Arithmetic Coding

Arithmetic coding: entropy-optimal compression.

Read article
ARTICLE · 27

Articulation Points (Cut Vertices)

Find vertices whose removal disconnects graph.

Read article
ARTICLE · 28

AVL Tree

How AVL trees maintain balance via height difference limits and rotations.

Read article
ARTICLE · 29

AVL Tree

Self-balancing AVL tree.

Read article
ARTICLE · 30

B+ Tree

B+ tree for on-disk sorted data.

Read article
ARTICLE · 31

B-Tree

B-tree: multi-way branching for disk-optimized search.

Read article
ARTICLE · 32

Backtracking

How backtracking systematically explores solution spaces, prunes branches that can't succeed, and solves N-Queens, Sudoku, and co…

Read article
ARTICLE · 33

Bellman-Ford

How Bellman-Ford computes shortest paths in O(VE), handling negative edges.

Read article
ARTICLE · 34

Bellman-Ford Deep Dive

Bellman-Ford shortest paths deep dive.

Read article
ARTICLE · 35

BFS and DFS

How breadth-first and depth-first search traverse graphs, when to use each, and applications from shortest path to cycle detection.

Read article
ARTICLE · 36

Biconnected Components

Decompose graph into biconnected components.

Read article
ARTICLE · 37

Bidirectional Search

Search from both source and target.

Read article
ARTICLE · 38

Big-O Notation

How Big-O notation describes worst-case time and space complexity, why constants and lower-order terms drop, and how to reason about scalability.

Read article
ARTICLE · 39

2D Binary Indexed Tree

How 2D BIT extends BIT for grid range queries.

Read article
ARTICLE · 40

Binary Search Tree Deep Dive

BST: fundamental ordered dictionary structure.

Read article
ARTICLE · 41

Bipartite Matching

How to find max matching in bipartite graphs via max flow or Hopcroft-Karp.

Read article
ARTICLE · 42

Bit Hacks Catalog

Reference catalog of bit hacks.

Read article
ARTICLE · 43

Bit Manipulation Fundamentals

Core bit manipulation operations for algorithms.

Read article
ARTICLE · 44

Bitboards for Chess

Bitboards: 64-bit int per piece type.

Read article
ARTICLE · 45

Bitmask DP

How bitmask DP handles problems with small subsets (n ≤ 20).

Read article
ARTICLE · 46

Bloom filter architecture

Deep-dive on Bloom filter architecture: hash family, sizing math, counting and cuckoo variants, and the ops layer for production use.

Read article
ARTICLE · 47

Bloom Filter

How Bloom filters test set membership with false positives but no false negatives, using little memory.

Read article
ARTICLE · 48

Bloom Filter Deep Dive

Bloom filter: probabilistic set membership.

Read article
ARTICLE · 49

Bloom Filter Variants

Counting + partitioned + scalable Bloom filters.

Read article
ARTICLE · 50

Borůvka's Algorithm

Borůvka's algorithm: parallelizable MST computation.

Read article
ARTICLE · 51

Boyer-Moore String Matching

Boyer-Moore: sub-linear in practice.

Read article
ARTICLE · 52

Boyer-Moore Deep Dive

Boyer-Moore string search deep dive.

Read article
ARTICLE · 53

Bridges (Cut Edges) in Graphs

Find edges whose removal disconnects graph.

Read article
ARTICLE · 54

Brotli Compression

Brotli compression algorithm.

Read article
ARTICLE · 55

BSP

BSP model: alternating compute + comm supersteps.

Read article
ARTICLE · 56

Burrows-Wheeler Transform

BWT: reversible transform for compression.

Read article
ARTICLE · 57

Burrows-Wheeler Transform Deep

BWT deep dive.

Read article
ARTICLE · 58

Centroid Decomposition

How centroid decomposition enables efficient tree query algorithms.

Read article
ARTICLE · 59

Chinese Remainder Theorem

Solve systems of modular congruences.

Read article
ARTICLE · 60

Christofides Algorithm

Christofides algorithm for metric TSP.

Read article
ARTICLE · 61

Chromatic Number + Chromatic Polynomial

Chromatic number and polynomial: coloring counts.

Read article
ARTICLE · 62

Clique NP-Hardness Reduction

3-SAT to Clique reduction proves clique NP-hard.

Read article
ARTICLE · 63

Closest Pair of Points

Divide-and-conquer O(n log n) closest pair.

Read article
ARTICLE · 64

Count-Min Sketch Architecture in Depth

A 2500-word walkthrough of Count-Min Sketch: d × w counter matrix, hash functions, insert + query, overestimate math, parameters, applications, varian…

Read article
ARTICLE · 65

Combinatorics

How to count arrangements: permutations, combinations, Catalan numbers, inclusion-exclusion.

Read article
ARTICLE · 66

Computational Biology Algorithms

Overview of algorithms in computational biology.

Read article
ARTICLE · 67

Consistent hashing architecture

Deep-dive on consistent hashing: ring, virtual nodes, replica walk, bounded loads, Anchor/Jump/Rendezvous variants, and cluster management.

Read article
ARTICLE · 68

Convex Hull

How convex hull algorithms (Graham scan, Andrew's monotone chain) compute in O(n log n).

Read article
ARTICLE · 69

3D Convex Hull

3D convex hull: O(n log n) with QuickHull.

Read article
ARTICLE · 70

Convex Optimization

Convex optimization: efficiently solvable.

Read article
ARTICLE · 71

Count-Min Sketch

How Count-Min Sketch estimates frequencies in streams using little memory.

Read article
ARTICLE · 72

Count-Min Sketch Deep Dive

Count-Min sketch for frequency estimation.

Read article
ARTICLE · 73

Count Sketch

Count sketch for streaming frequency.

Read article
ARTICLE · 74

Count-Min sketch architecture

Deep-dive on Count-Min sketch: d hash functions, w counters per row, increment, min query, error bound, merge, conservative update.

Read article
ARTICLE · 75

Cuckoo Filter

Cuckoo filter: modern Bloom alternative.

Read article
ARTICLE · 76

Cuckoo filters

Deep-dive on cuckoo filters: partial-key cuckoo hashing and the i2 = i1 XOR hash(fp) involution, fingerprint sizing and the 2b/2^f false-positive math…

Read article
ARTICLE · 77

Cuckoo Hashing

Cuckoo hashing: O(1) worst-case lookup dynamic.

Read article
ARTICLE · 78

D* / D* Lite

D* Lite: incremental replanning for robot navigation.

Read article
ARTICLE · 79

De Bruijn Graph Assembly

De Bruijn graphs for genome assembly.

Read article
ARTICLE · 80

Delaunay Triangulation

Delaunay: max-min-angle triangulation.

Read article
ARTICLE · 81

Delta Encoding

Delta encoding: store differences.

Read article
ARTICLE · 82

Derandomization

Convert randomized to deterministic algorithms.

Read article
ARTICLE · 83

Diffie-Hellman Key Exchange

DH: classic key exchange.

Read article
ARTICLE · 84

Digit DP

How digit DP counts numbers ≤ N satisfying properties.

Read article
ARTICLE · 85

Dijkstra's Algorithm

How Dijkstra's algorithm finds shortest paths, why it needs non-negative weights, and the priority-queue implementation for O((V+…

Read article
ARTICLE · 86

Dinic's Algorithm

How Dinic's algorithm achieves O(V²E) max flow using level graphs and blocking flows.

Read article
ARTICLE · 87

Dinic's Max Flow

Dinic's max flow algorithm.

Read article
ARTICLE · 88

Discrete Logarithm Problem

DLP: find x such that g^x = h mod p.

Read article
ARTICLE · 89

DiskANN architecture

Deep-dive on DiskANN: the Vamana low-diameter graph, product-quantized guidance in RAM with full vectors on disk, beam search and exact re-rank, alpha…

Read article
ARTICLE · 90

Distributed Consensus Architecture: Raft, Paxos, and Beyond

A 2500-word walkthrough of a modern consensus system: client, coordinator, leader, log, followers, state machines, and snapshots.

Read article
ARTICLE · 91

Divide and Conquer

How divide-and-conquer solves problems by splitting them, solving subproblems recursively, and combining results. Master theorem for complexity.

Read article
ARTICLE · 92

Coin Change DP

Coin change: min coins + count ways DP.

Read article
ARTICLE · 93

Edit Distance

Levenshtein distance: min edits between strings.

Read article
ARTICLE · 94

Egg Drop Puzzle DP

Egg drop: min trials to find critical floor.

Read article
ARTICLE · 95

0/1 Knapsack DP

0/1 knapsack: max value under weight limit.

Read article
ARTICLE · 96

Longest Common Subsequence

LCS: DP for longest common subsequence.

Read article
ARTICLE · 97

Longest Increasing Subsequence

LIS: O(n log n) via patience sorting.

Read article
ARTICLE · 98

Matrix Chain Multiplication

Matrix chain: optimal parenthesization DP.

Read article
ARTICLE · 99

Optimal BST

Optimal BST: DP with Knuth optimization.

Read article
ARTICLE · 100

Rod Cutting DP

Rod cutting: max revenue from cutting rod.

Read article
ARTICLE · 101

Wildcard Pattern Matching DP

Wildcard matching: * and ? patterns.

Read article
ARTICLE · 102

DSU on Tree (Small-to-Large)

How small-to-large merging enables efficient subtree queries.

Read article
ARTICLE · 103

Dynamic Graph Connectivity

Dynamic connectivity algorithms.

Read article
ARTICLE · 104

Dynamic Programming

How dynamic programming solves problems by breaking into overlapping subproblems and storing results, and the classic patterns.

Read article
ARTICLE · 105

ECC Deep Dive

ECC: elliptic curve cryptography.

Read article
ARTICLE · 106

ECDH

ECDH: Diffie-Hellman on elliptic curves.

Read article
ARTICLE · 107

Ed25519

Ed25519: modern signature scheme.

Read article
ARTICLE · 108

Edge-Disjoint Paths

Max edge-disjoint paths via max flow.

Read article
ARTICLE · 109

Edit Distance

Edit distance (Levenshtein).

Read article
ARTICLE · 110

Edmonds-Karp

How Edmonds-Karp uses BFS for augmenting paths, giving O(VE²) worst case.

Read article
ARTICLE · 111

Edmonds-Karp Deep Dive

Edmonds-Karp: BFS-based max flow O(VE^2).

Read article
ARTICLE · 112

Edmonds' Blossom Algorithm

Edmonds' blossom for max matching.

Read article
ARTICLE · 113

Ellipsoid Algorithm

Ellipsoid method: polynomial LP algorithm.

Read article
ARTICLE · 114

Entropy Coding Overview

Overview of entropy coding methods.

Read article
ARTICLE · 115

Epoch-Based Reclamation

Epoch-based GC for lock-free.

Read article
ARTICLE · 116

Euclidean Algorithm

Euclid's algorithm for GCD.

Read article
ARTICLE · 117

Euler Totient Function

Count integers coprime to n; core number-theoretic tool.

Read article
ARTICLE · 118

Euler Tour on Tree

Euler tour: linearize tree for range queries.

Read article
ARTICLE · 119

Exchange Argument

Exchange argument: proving greedy optimality.

Read article
ARTICLE · 120

Expander Graphs

Expanders: sparse yet well-connected graphs.

Read article
ARTICLE · 121

Expected Value in Algorithms

How expected value analysis rigorously bounds randomized algorithm behavior.

Read article
ARTICLE · 122

Expectimax

Expectimax: minimax with expected value at chance nodes.

Read article
ARTICLE · 123

Extended Euclidean Algorithm

Extended Euclidean: find u, v with au + bv = gcd(a, b).

Read article
ARTICLE · 124

Fenwick Tree (BIT)

How Fenwick trees (Binary Indexed Trees) enable O(log n) point updates and prefix sum queries with less overhead than segment trees.

Read article
ARTICLE · 125

Fenwick tree architecture

Deep-dive on the Fenwick tree (binary indexed tree): the range each cell owns via lowbit(i) = i & -i, upward-walking updates a…

Read article
ARTICLE · 126

Fast Fourier Transform

How FFT computes polynomial multiplication in O(n log n) via frequency domain transformation.

Read article
ARTICLE · 127

FFT Deep Dive

Implementation details of Cooley-Tukey FFT.

Read article
ARTICLE · 128

Fibonacci Heap

Fibonacci heap for Dijkstra.

Read article
ARTICLE · 129

Algorithms: Choosing the Right Tool

Choosing the right algorithm for the job.

Read article
ARTICLE · 130

Finger Search

Finger search: O(log d) for nearby search.

Read article
ARTICLE · 131

Fixed-Point Arithmetic

Fixed-point for deterministic decimal math.

Read article
ARTICLE · 132

Advanced Flow Networks

Extensions to flow networks: vertex capacities, lower bounds, gomory-hu trees.

Read article
ARTICLE · 133

Floyd-Warshall

How Floyd-Warshall computes all-pairs shortest paths in O(V³) via dynamic programming.

Read article
ARTICLE · 134

Floyd-Warshall Deep Dive

Floyd-Warshall all-pairs shortest paths.

Read article
ARTICLE · 135

Ford-Fulkerson Deep Dive

Ford-Fulkerson max flow algorithm.

Read article
ARTICLE · 136

Futexes

Fast userspace mutexes (futex).

Read article
ARTICLE · 137

Gale-Shapley Deep Dive

Gale-Shapley: stable matching foundation.

Read article
ARTICLE · 138

Game Theory

Foundational game theory algorithms: minimax, Grundy numbers, alpha-beta pruning.

Read article
ARTICLE · 139

Gaussian Elimination

Solve linear systems Ax = b in O(n^3).

Read article
ARTICLE · 140

Genetic Algorithms

How genetic algorithms optimize via crossover + mutation of candidate solutions.

Read article
ARTICLE · 141

Gomory-Hu Tree

Gomory-Hu: all-pairs min-cuts via n-1 max-flows.

Read article
ARTICLE · 142

GPU-Specific Algorithms

Algorithm design for GPU architecture.

Read article
ARTICLE · 143

Gradient Descent Convergence

How to analyze gradient descent convergence: convex vs non-convex, smooth vs non-smooth.

Read article
ARTICLE · 144

Gradient Descent Theory

Convergence theory for gradient descent.

Read article
ARTICLE · 145

Grammar-Based Compression

Grammar compression: rewrite as CFG.

Read article
ARTICLE · 146

Graph Coloring

The graph coloring problem, its NP-hardness, and practical heuristics (greedy, backtracking).

Read article
ARTICLE · 147

Gray Code

Reflected binary Gray code and applications.

Read article
ARTICLE · 148

Greedy Algorithms

How greedy algorithms make locally-optimal choices, when they yield globally optimal solutions, and classic examples (Huffman, Dijkstra).

Read article
ARTICLE · 149

Activity Selection

Activity selection: max non-overlapping activities.

Read article
ARTICLE · 150

Dijkstra Deep

Dijkstra as greedy algorithm.

Read article
ARTICLE · 151

Fractional Knapsack

Fractional knapsack: greedy by value/weight ratio.

Read article
ARTICLE · 152

Gas Station Circular Problem

Circular tour: greedy first-station selection.

Read article
ARTICLE · 153

Huffman Coding

Huffman: optimal prefix code via greedy.

Read article
ARTICLE · 154

Interval Scheduling

Weighted vs unweighted interval scheduling.

Read article
ARTICLE · 155

Job Sequencing with Deadlines

Job sequencing: profit + deadlines greedy.

Read article
ARTICLE · 156

Meeting Rooms

Min meeting rooms: greedy + PQ.

Read article
ARTICLE · 157

Half-Plane Intersection

Half-plane intersection: O(n log n) convex polygon.

Read article
ARTICLE · 158

Hall's Marriage Theorem

Hall's theorem: bipartite matching characterization.

Read article
ARTICLE · 159

Halting Problem

Turing's undecidable halting problem.

Read article
ARTICLE · 160

Hamiltonian Path NP-Hard Reduction

Reduce 3-SAT to Hamiltonian path.

Read article
ARTICLE · 161

Hash Tables

How hash tables provide O(1) average lookup, collision resolution strategies (chaining, open addressing), and load factor tuning.

Read article
ARTICLE · 162

Hazard Pointers

Hazard pointers for memory reclamation.

Read article
ARTICLE · 163

Heap Operations

How binary heaps implement priority queues in O(log n), the heapify trick, and applications from Dijkstra to scheduling.

Read article
ARTICLE · 164

Heavy Hitters

Heavy hitter algorithms: Misra-Gries, Space-Saving, CountSketch.

Read article
ARTICLE · 165

Heavy-Light Decomposition

How heavy-light decomposition enables O(log² n) path queries + updates on trees.

Read article
ARTICLE · 166

Heavy Path Decomposition Deep Dive

How heavy path decomposition enables efficient tree queries.

Read article
ARTICLE · 167

Hirschberg's Algorithm

Space-efficient sequence alignment.

Read article
ARTICLE · 168

HITS Algorithm

HITS: hubs + authorities link analysis.

Read article
ARTICLE · 169

HKDF

HKDF: derive keys from shared secrets.

Read article
ARTICLE · 170

HyperLogLog

How HyperLogLog estimates unique count using O(log log n) memory via hash bit-pattern analysis.

Read article
ARTICLE · 171

HyperLogLog Algorithm Architecture in Depth

A 2500-word walkthrough of HyperLogLog: hash function, bucketing, rank via leading zeros, harmonic mean estimator, bias correction, merge, space-error…

Read article
ARTICLE · 172

HyperLogLog Streaming Applications

HLL in streaming systems: Kafka, Redis, analytics.

Read article
ARTICLE · 173

HNSW architecture

Deep-dive on HNSW: layered proximity graphs, greedy descent and efSearch beam search, geometric level assignment, the diversity neighbor heuristic, fi…

Read article
ARTICLE · 174

Hopcroft-Karp

Hopcroft-Karp: max bipartite matching in O(E sqrt V).

Read article
ARTICLE · 175

Hopscotch Hashing

Hopscotch hashing: cache-friendly open addressing.

Read article
ARTICLE · 176

Hungarian Algorithm

How Hungarian algorithm solves weighted bipartite matching in O(V³).

Read article
ARTICLE · 177

HyperLogLog

HyperLogLog: approximate cardinality with tiny memory.

Read article
ARTICLE · 178

HyperLogLog architecture

Deep-dive on HyperLogLog: bucket + leading zeros, registers, harmonic-mean estimate, error bound, merge, sparse/dense, HLL++.

Read article
ARTICLE · 179

HyperLogLog Deep Dive

HyperLogLog for distinct counting.

Read article
ARTICLE · 180

IEEE 754 Floating Point

IEEE 754 format and pitfalls.

Read article
ARTICLE · 181

Interior Point Methods

Interior point: polynomial LP + convex optimization.

Read article
ARTICLE · 182

Integer Programming Hardness

IP: NP-hard general integer programming.

Read article
ARTICLE · 183

Integer Programming and LP

How Integer Programming (IP) and Linear Programming (LP) solve constrained optimization.

Read article
ARTICLE · 184

Iterative Deepening Search

Iterative deepening: DFS at increasing depths.

Read article
ARTICLE · 185

IVF-PQ vector index architecture

Deep-dive on the IVF-PQ approximate nearest-neighbor index: coarse quantization and inverted lists (nlist/nprobe), product quantization into per-subsp…

Read article
ARTICLE · 186

Johnson's Algorithm

Johnson's algorithm: all-pairs shortest paths in sparse graphs.

Read article
ARTICLE · 187

Johnson's Algorithm

How Johnson's algorithm computes all-pairs shortest paths in graphs with negative edges.

Read article
ARTICLE · 188

Johnson's Algorithm

Johnson's algorithm for all-pairs shortest paths.

Read article
ARTICLE · 189

Jump Point Search

JPS: accelerated A* on uniform-cost grids.

Read article
ARTICLE · 190

Karatsuba Multiplication

Multiply n-digit numbers in O(n^1.585).

Read article
ARTICLE · 191

Karmarkar's Algorithm

Karmarkar's LP algorithm.

Read article
ARTICLE · 192

Karp Reductions

Poly-time many-one reductions.

Read article
ARTICLE · 193

KD-Tree Range Queries

How KD-trees answer range + nearest neighbor queries in multi-dimensional space.

Read article
ARTICLE · 194

KD-Tree

How KD-trees enable nearest-neighbor and range queries in multi-dimensional space.

Read article
ARTICLE · 195

KMP Algorithm

How the Knuth-Morris-Pratt algorithm finds a pattern in text in O(n+m) by precomputing a failure function.

Read article
ARTICLE · 196

KMP Algorithm Deep Dive

Knuth-Morris-Pratt algorithm deep dive.

Read article
ARTICLE · 197

Knapsack Problem

The 0/1 knapsack problem: pick items to maximize value under weight constraint. DP solution.

Read article
ARTICLE · 198

König's Theorem

König's theorem: min vertex cover = max matching in bipartite.

Read article
ARTICLE · 199

Kruskal's MST Deep Dive

Kruskal's algorithm with union-find optimizations.

Read article
ARTICLE · 200

Kth Order Statistics

Kth smallest / largest problems.

Read article
ARTICLE · 201

Lagrangian Duality

Lagrangian: constrained convex optimization.

Read article
ARTICLE · 202

Las Vegas Algorithms

Las Vegas: always correct, random runtime.

Read article
ARTICLE · 203

Lowest Common Ancestor

How LCA queries find lowest common ancestor of two nodes in tree efficiently.

Read article
ARTICLE · 204

LCA via Binary Lifting

Lowest common ancestor via binary lifting: O(log n) query.

Read article
ARTICLE · 205

LCP Array

LCP array: complements suffix array.

Read article
ARTICLE · 206

Longest Common Subsequence

How LCS finds the longest common subsequence via O(mn) DP, and its role in diff and version control.

Read article
ARTICLE · 207

Leftist Heap

Leftist heap: mergeable priority queue.

Read article
ARTICLE · 208

Lifelong Planning A* (LPA*)

LPA*: reuse search under changing edge costs.

Read article
ARTICLE · 209

Line Sweep Algorithms

Line sweep: process events in coordinate order.

Read article
ARTICLE · 210

Linear Sieve

Linear sieve: O(n) prime generation.

Read article
ARTICLE · 211

Link-Cut Trees Deep Dive

Link-cut trees: dynamic forest operations.

Read article
ARTICLE · 212

Link-Cut Trees

How Link-Cut trees maintain forest of trees under link + cut in O(log n) amortized.

Read article
ARTICLE · 213

Lock-Free Data Structures

Lock-free algorithms via CAS.

Read article
ARTICLE · 214

Lock-Free Queues

Lock-free queue algorithms.

Read article
ARTICLE · 215

Lock-Free Stack

Lock-free stack algorithms.

Read article
ARTICLE · 216

LP Duality

Linear programming duality theorem.

Read article
ARTICLE · 217

LP Rounding for Approximation

Round fractional LP solutions to integer.

Read article
ARTICLE · 218

Simplex Algorithm

Simplex: pivoting through vertices to solve LP.

Read article
ARTICLE · 219

LRU cache architecture

Deep-dive on LRU cache: hash map + linked list, admission policies (TinyLFU), concurrency, TTL, weighted entries, variants.

Read article
ARTICLE · 220

LSM Tree Compaction Architecture in Depth

A 2500-word walkthrough of LSM compaction: memtable → SSTables, STCS/LCS/TWCS strategies, triggers, throttling, and read/write/space amplification.

Read article
ARTICLE · 221

LSM-Tree

How LSM-trees enable write-optimized storage in Cassandra, RocksDB, LevelDB.

Read article
ARTICLE · 222

LSM Tree Deep Dive

Log-structured merge tree deep dive.

Read article
ARTICLE · 223

LSM trees vs B-trees

Deep-dive on LSM trees vs B-trees: in-place read-optimized B-trees vs append-merge write-optimized LSM trees, write/read/space amplification, compacti…

Read article
ARTICLE · 224

LZ4 Compression

LZ4 compression algorithm.

Read article
ARTICLE · 225

LZ78 Compression

LZ78: dictionary-tree compression.

Read article
ARTICLE · 226

Manacher's Algorithm

Manacher's palindrome algorithm.

Read article
ARTICLE · 227

MapReduce Model

MapReduce: partition + map + reduce.

Read article
ARTICLE · 228

Matrix Exponentiation

Solve linear recurrences in O(k^3 log n) via matrix power.

Read article
ARTICLE · 229

Matrix Exponentiation

How matrix exponentiation computes linear recurrences in O(log n) via matrix power.

Read article
ARTICLE · 230

Matroid Theory + Greedy

Matroid characterization when greedy is optimal.

Read article
ARTICLE · 231

Matroid Intersection

Matroid intersection algorithm.

Read article
ARTICLE · 232

Matroids

How matroids characterize when greedy algorithms work optimally.

Read article
ARTICLE · 233

Maximum Clique Problem

Find largest complete subgraph — NP-hard.

Read article
ARTICLE · 234

Maximum Independent Set

Largest vertex set with no edges — dual of max clique.

Read article
ARTICLE · 235

General Graph Matching

How Edmonds' blossom algorithm finds max matching in general (non-bipartite) graphs.

Read article
ARTICLE · 236

General Graph Matching

Maximum matching in general graphs (not just bipartite).

Read article
ARTICLE · 237

Monte Carlo Tree Search Deep Dive

MCTS: sampling-based tree search for games + planning.

Read article
ARTICLE · 238

Median of Medians

Deterministic O(n) selection via median-of-medians pivot.

Read article
ARTICLE · 239

Meet in the Middle

How meet-in-the-middle technique solves problems in O(2^(n/2)) instead of O(2^n).

Read article
ARTICLE · 240

Mergesort

How mergesort divides, sorts, and merges. Why it's stable, why it's the choice for linked lists, and how it …

Read article
ARTICLE · 241

Merkle trees -- efficient verification of large data

Deep-dive on Merkle trees: hashing data blocks into leaves and up to a single root, tamper evidence (any change alters the root), O(1) root comparison…

Read article
ARTICLE · 242

Miller-Rabin Primality Test

Miller-Rabin: probabilistic primality test.

Read article
ARTICLE · 243

Min Cost Max Flow

How min-cost max-flow finds max flow at minimum edge cost.

Read article
ARTICLE · 244

Min-Cut / Max-Flow Theorem

Fundamental theorem: max flow equals min cut in any network.

Read article
ARTICLE · 245

Minimum Spanning Arborescence

How to find minimum spanning arborescence (rooted directed spanning tree).

Read article
ARTICLE · 246

Minimax Deep Dive

Minimax algorithm foundation.

Read article
ARTICLE · 247

Mo's Algorithm

How Mo's algorithm answers many offline range queries in O((n+q)√n).

Read article
ARTICLE · 248

Möbius Function + Inversion

Möbius function + inversion for number-theoretic sums.

Read article
ARTICLE · 249

Modular Exponentiation

Fast modular exponentiation via square-and-multiply.

Read article
ARTICLE · 250

Monte Carlo Algorithms

Monte Carlo: fixed time, may err.

Read article
ARTICLE · 251

Moving Percentile / Median

Moving percentile / median over stream.

Read article
ARTICLE · 252

Multiplicative Weights

Multiplicative weights update method.

Read article
ARTICLE · 253

Needleman-Wunsch Global Alignment

Global sequence alignment DP.

Read article
ARTICLE · 254

Negamax Framework

Negamax: cleaner minimax formulation.

Read article
ARTICLE · 255

NP-Complete Problems

NP-Complete class + Cook-Levin theorem.

Read article
ARTICLE · 256

NP-Completeness

How NP-complete problems relate; reductions; approximation strategies for intractable problems.

Read article
ARTICLE · 257

NP-Hard Problems

NP-Hard class: at least as hard as NP-Complete.

Read article
ARTICLE · 258

Number Theoretic Transform

FFT over finite fields for exact polynomial multiplication.

Read article
ARTICLE · 259

Number Theory Algorithms

The essential number theory algorithms for competitive programming and cryptography.

Read article
ARTICLE · 260

Advanced Number Theory

Advanced number theory: Miller-Rabin primality, Pollard rho factorization, discrete log.

Read article
ARTICLE · 261

Offline LCA

How Tarjan's offline LCA algorithm uses DSU for near-linear LCA queries.

Read article
ARTICLE · 262

Offline Query Processing

How offline query processing sorts + batches queries for efficiency.

Read article
ARTICLE · 263

Online Algorithms

How online algorithms make irrevocable decisions without knowing the future.

Read article
ARTICLE · 264

Online LCA

How online LCA queries work: Euler tour + RMQ.

Read article
ARTICLE · 265

Online Learning Framework

Online learning: predict + observe + update loop.

Read article
ARTICLE · 266

Optimization Landscape

How the shape of the optimization landscape affects algorithm choice.

Read article
ARTICLE · 267

PageRank Deep Dive

PageRank: Google's link analysis.

Read article
ARTICLE · 268

Pairing Heap

Pairing heap alternative.

Read article
ARTICLE · 269

Pairwise Independence

Pairwise independent hash families.

Read article
ARTICLE · 270

Parallel BFS

Parallel breadth-first search.

Read article
ARTICLE · 271

Parallel Matrix Multiplication

Parallel matmul: SUMMA + Cannon + 2.5D.

Read article
ARTICLE · 272

Parallel Prefix Sum (Scan)

Prefix sum in O(log n) parallel time.

Read article
ARTICLE · 273

Parallel Sorting

Parallel sort: bitonic + radix + merge.

Read article
ARTICLE · 274

Parameterized Complexity

Parameterized complexity: exact algorithms in parameter k.

Read article
ARTICLE · 275

Partial Sort

Partial sort: sort first K only.

Read article
ARTICLE · 276

PBKDF2

PBKDF2: derive keys from passwords.

Read article
ARTICLE · 277

PCP Theorem

PCP theorem: hardness of approximation foundation.

Read article
ARTICLE · 278

Perfect Hashing

Perfect hashing: O(1) worst-case for static sets.

Read article
ARTICLE · 279

Persistent Data Structures

How persistent data structures allow modifications while preserving old versions via structural sharing.

Read article
ARTICLE · 280

Persistent Union-Find

Persistent DSU: versioned union-find.

Read article
ARTICLE · 281

Persistent Segment Tree

How persistent segment trees support queries on historical versions.

Read article
ARTICLE · 282

Persistent Segment Tree Deep Dive

Persistent segment trees for historical queries.

Read article
ARTICLE · 283

Persistent Treap

How persistent treaps enable versioned sequence operations.

Read article
ARTICLE · 284

Planar Graph Algorithms

How algorithms exploit planar graph structure for better complexity.

Read article
ARTICLE · 285

Planarity Testing

Test if graph can be drawn without edge crossings.

Read article
ARTICLE · 286

Point in Polygon

Ray casting: O(n) point-in-polygon test.

Read article
ARTICLE · 287

Pollard's Rho Factorization

Pollard's rho: probabilistic factorization O(n^1/4).

Read article
ARTICLE · 288

Polygon Algorithms

Key polygon algorithms: area (shoelace), point-in-polygon (ray casting), triangulation (ear clipping).

Read article
ARTICLE · 289

Polygon Area

Shoelace: O(n) polygon area.

Read article
ARTICLE · 290

Polynomial Hashing

How polynomial rolling hash enables fast string comparison.

Read article
ARTICLE · 291

Population Count

Popcount algorithms and hardware support.

Read article
ARTICLE · 292

Potential Method for Amortized

Potential function amortized analysis.

Read article
ARTICLE · 293

Personalized PageRank

PPR: PageRank with personalization vector.

Read article
ARTICLE · 294

PRAM Model

PRAM: parallel random access machine.

Read article
ARTICLE · 295

Prim's MST Deep Dive

Prim's algorithm with binary + Fibonacci heaps.

Read article
ARTICLE · 296

Sieve of Eratosthenes

How the Sieve of Eratosthenes generates primes up to N in O(n log log n) time.

Read article
ARTICLE · 297

PRM

PRM: sampling-based roadmap for multi-query planning.

Read article
ARTICLE · 298

Probabilistic Counting

Probabilistic counting for distinct elements.

Read article
ARTICLE · 299

Probability in Algorithms

How probability powers randomized algorithms (quicksort, hashing, primality) with strong guarantees.

Read article
ARTICLE · 300

Probability DP

How DP computes expected values over probabilistic transitions.

Read article
ARTICLE · 301

PTAS and FPTAS

How PTAS (Polynomial-Time Approximation Scheme) gets arbitrarily close to optimal.

Read article
ARTICLE · 302

PTAS and FPTAS Approximation Schemes

Polynomial-time approximation schemes.

Read article
ARTICLE · 303

Push-Relabel Algorithm

Push-relabel max flow algorithm.

Read article
ARTICLE · 304

Quadratic Residues

Testing + computing quadratic residues mod p.

Read article
ARTICLE · 305

Quicksort

How quicksort partitions around a pivot and recursively sorts, why it's O(n log n) average, and how to avoid O(n²) worst case.

Read article
ARTICLE · 306

Quotient Filter

Quotient filter: cache-friendly approximate set.

Read article
ARTICLE · 307

The quotient filter

Deep-dive on the quotient filter: splitting a key's hash into a quotient (home slot) and a stored remainder, the three metada…

Read article
ARTICLE · 308

R-Tree

How R-trees index spatial objects via bounding rectangle hierarchies, powering GIS databases.

Read article
ARTICLE · 309

Rabin-Karp String Search

Rabin-Karp rolling hash search.

Read article
ARTICLE · 310

Rabin-Karp Deep Dive

Rabin-Karp: rolling hash for pattern matching.

Read article
ARTICLE · 311

Random Permutation

Random permutation generation.

Read article
ARTICLE · 312

Random Selection

Random selection algorithms.

Read article
ARTICLE · 313

Random Walks

Random walks on graphs.

Read article
ARTICLE · 314

Randomized Quicksort

Randomized quicksort: expected O(n log n) regardless of input.

Read article
ARTICLE · 315

Randomized Rounding

How randomized rounding turns LP solutions into integer solutions.

Read article
ARTICLE · 316

Range Coder

Range coder: integer arithmetic coding.

Read article
ARTICLE · 317

Range Updates + Point Queries

How to handle range updates and point queries efficiently via difference arrays.

Read article
ARTICLE · 318

Rank + Select Structures

Rank + select data structures.

Read article
ARTICLE · 319

RCU (Read-Copy-Update)

RCU synchronization pattern.

Read article
ARTICLE · 320

Red-Black Tree

How red-black trees use color rules to maintain balance with less rotation than AVL.

Read article
ARTICLE · 321

Red-Black Tree

Red-Black: loosely balanced BST for TreeMap.

Read article
ARTICLE · 322

Regular Expressions

How regular expressions work (NFA/DFA), and the practical patterns that keep them fast and correct.

Read article
ARTICLE · 323

Rendezvous hashing architecture

Deep-dive on rendezvous hashing (HRW): argmax over hash(key, node), replication, weighted, skeleton, comparison with consistent hashing.

Read article
ARTICLE · 324

Reservoir sampling architecture

Deep-dive on reservoir sampling: Algorithm R, Vitter variants, weighted A-Res, distributed merge, streaming APIs, use cases.

Read article
ARTICLE · 325

Reservoir Sampling

Reservoir sampling for streaming uniform samples.

Read article
ARTICLE · 326

Reservoir sampling

Deep-dive on reservoir sampling (Algorithm R): drawing k items uniformly at random from a stream of unknown length in a single forward pass with O(k) …

Read article
ARTICLE · 327

Reverse-Delete Algorithm

Reverse-delete: MST by removing edges in decreasing order.

Read article
ARTICLE · 328

Ribbon filter architecture

Deep-dive on the ribbon filter: a static approximate-membership structure that encodes the key set as a solved banded linear system over GF(2), reachi…

Read article
ARTICLE · 329

Roaring bitmaps -- compressed bitmaps that stay fast

Deep-dive on roaring bitmaps: the bitmap dilemma (fast but big, or small but slow), chunking the integer space by the high 16 bits, the three adaptive…

Read article
ARTICLE · 330

RRT

RRT: sampling-based planning for high-dim spaces.

Read article
ARTICLE · 331

Run-Length Encoding

RLE: encode runs of same value.

Read article
ARTICLE · 332

SAT Reduction Technique

Reducing to SAT: encoding problems as SAT.

Read article
ARTICLE · 333

SAT Solving

How modern SAT solvers (DPLL, CDCL) handle NP-hard boolean satisfiability efficiently in practice.

Read article
ARTICLE · 334

Saturating Arithmetic

Saturating arithmetic clamps at range limits.

Read article
ARTICLE · 335

Kosaraju's SCC Algorithm

Kosaraju: strongly connected components via two DFS.

Read article
ARTICLE · 336

Segment Intersection

Bentley-Ottmann: O((n + k) log n) segment intersection.

Read article
ARTICLE · 337

Segment Tree

How segment trees enable range sum, min, max queries in O(log n), and how lazy propagation supports range updates.

Read article
ARTICLE · 338

Segment Tree with Lazy Propagation Deep Dive

How lazy propagation enables efficient range updates on segment tree.

Read article
ARTICLE · 339

Selection Algorithms

Selection algorithms overview.

Read article
ARTICLE · 340

Selection + Medians Deep Dive

Selection algorithms + medians deep dive.

Read article
ARTICLE · 341

Seqlock

Seqlock synchronization primitive.

Read article
ARTICLE · 342

Set Cover Greedy

Greedy algorithm for min set cover.

Read article
ARTICLE · 343

SHA-3 (Keccak)

SHA-3: modern hash function.

Read article
ARTICLE · 344

Fisher-Yates Shuffle

Deep dive on Fisher-Yates shuffle.

Read article
ARTICLE · 345

Sieve of Eratosthenes Deep Dive

Sieve: enumerate primes up to n.

Read article
ARTICLE · 346

Simplex Algorithm

How Simplex algorithm solves LP by moving along vertices of feasible polytope.

Read article
ARTICLE · 347

Simulated Annealing

How simulated annealing escapes local optima via probabilistic acceptance.

Read article
ARTICLE · 348

Skip List

Skip list probabilistic sorted structure.

Read article
ARTICLE · 349

Skip list architecture

Deep-dive on skip lists: levels, level selection, search, insert/delete, concurrent variants, range iterators, memory, use cases.

Read article
ARTICLE · 350

Sliding Window Minimum

Sliding window minimum with deque in O(n).

Read article
ARTICLE · 351

Snappy Compression

Snappy compression algorithm.

Read article
ARTICLE · 352

Sorting Networks

Sorting networks: fixed comparison structure.

Read article
ARTICLE · 353

Space-Saving architecture

Deep-dive on the Space-Saving algorithm for approximate top-k heavy hitters: a fixed table of k counters, the increment-or-evict-the-minimum rule that…

Read article
ARTICLE · 354

Splay Tree

Splay tree self-adjusting BST.

Read article
ARTICLE · 355

Splay Trees Deep Dive

Splay trees: self-adjusting BSTs.

Read article
ARTICLE · 356

Splay Trees

How splay trees achieve O(log n) amortized without balance information.

Read article
ARTICLE · 357

Square Root Decomposition

How √n bucketing enables efficient range queries and updates.

Read article
ARTICLE · 358

Sqrt Tree

How sqrt tree enables O(1) range queries with O(n log log n) memory.

Read article
ARTICLE · 359

Stable Marriage

How Gale-Shapley finds stable matching between two groups with preferences.

Read article
ARTICLE · 360

Stable Matching

Gale-Shapley: stable marriage / matching in O(n^2).

Read article
ARTICLE · 361

Stoer-Wagner Min-Cut

Stoer-Wagner: deterministic global min-cut.

Read article
ARTICLE · 362

Streaming Algorithms

How streaming algorithms process data in one pass with sub-linear memory.

Read article
ARTICLE · 363

String Matching

The main string matching algorithms (naive, KMP, Boyer-Moore, Rabin-Karp) and when to use each.

Read article
ARTICLE · 364

KMP String Matching Deep Dive

Knuth-Morris-Pratt: linear-time string matching.

Read article
ARTICLE · 365

Succinct Bitvectors

Succinct: near-optimal space bitvectors.

Read article
ARTICLE · 366

Suffix Array

Suffix array data structure.

Read article
ARTICLE · 367

Suffix Tree

Suffix tree deep dive.

Read article
ARTICLE · 368

Tabu Search

How tabu search avoids revisiting recent solutions to escape local optima.

Read article
ARTICLE · 369

Tarjan's SCC Algorithm

Tarjan's strongly connected components.

Read article
ARTICLE · 370

t-digest architecture

Deep-dive on the t-digest quantile sketch: (mean, count) centroids, the scale function that warps cluster sizes to keep the tails sharp, the compressi…

Read article
ARTICLE · 371

Ternary Search

How ternary search finds max/min of unimodal function in O(log n).

Read article
ARTICLE · 372

Theta*

Theta*: any-angle path smoothing during search.

Read article
ARTICLE · 373

Tonelli-Shanks Algorithm

Tonelli-Shanks: square root mod prime.

Read article
ARTICLE · 374

Top-K / heavy hitters -- finding the most frequent in a stream

Deep-dive on top-K / heavy-hitter algorithms: the most-frequent-items problem, why exact counting is memory-prohibitive, Space-Saving (bounded counter…

Read article
ARTICLE · 375

Top-K in Streams

Top-K frequent items in streams.

Read article
ARTICLE · 376

Top Trees

Top trees: hierarchical decomposition.

Read article
ARTICLE · 377

Topological Sort

How topological sort orders DAG nodes so every edge goes forward, using DFS or Kahn's algorithm.

Read article
ARTICLE · 378

Transactional Memory

Software and hardware transactional memory.

Read article
ARTICLE · 379

Transposition Tables

Transposition tables: cache seen positions in game search.

Read article
ARTICLE · 380

Treap

How treaps combine BST + heap using random priorities for probabilistically balanced tree.

Read article
ARTICLE · 381

Treap Deep Dive

Treap: BST + heap by random priority.

Read article
ARTICLE · 382

Persistent Treaps

Persistent treaps: versioned treaps.

Read article
ARTICLE · 383

Tree DP

How to solve tree problems via DP over subtrees.

Read article
ARTICLE · 384

Trie

How tries store strings by prefix for fast lookup and autocomplete, and when to use them versus hash maps.

Read article
ARTICLE · 385

TSP Approximation Algorithms

Approximation algorithms for TSP.

Read article
ARTICLE · 386

TSP via Dynamic Programming

Held-Karp DP for exact TSP in O(n^2 * 2^n).

Read article
ARTICLE · 387

Two's Complement

Two's complement signed integers.

Read article
ARTICLE · 388

UCT

UCT: UCB1 applied to MCTS selection.

Read article
ARTICLE · 389

Undecidable Problems

Undecidable: no algorithm can decide.

Read article
ARTICLE · 390

Union-Find

How union-find (disjoint set union) supports near-O(1) merge and query operations via path compression and union by rank.

Read article
ARTICLE · 391

Universal Hashing

Universal hash families for collision bounds.

Read article
ARTICLE · 392

van Emde Boas Tree

van Emde Boas tree for integer sets.

Read article
ARTICLE · 393

Vertex Cover Approximation

2-approximation for min vertex cover.

Read article
ARTICLE · 394

Visibility Graph

Visibility graph for shortest paths around polygons.

Read article
ARTICLE · 395

Voronoi Diagrams

Voronoi: regions closest to sites.

Read article
ARTICLE · 396

Wavelet Tree

How wavelet trees enable k-th element + rank queries on ranges.

Read article
ARTICLE · 397

Wavelet Tree Deep Dive

Wavelet tree: succinct + rank/select.

Read article
ARTICLE · 398

Weighted Reservoir Sampling

Weighted reservoir sampling for streams.

Read article
ARTICLE · 399

Work Stealing

Work-stealing schedulers.

Read article
ARTICLE · 400

X-Fast Trie

X-fast trie for integer sets.

Read article
ARTICLE · 401

XOR Filter

XOR filter: modern approximate membership.

Read article
ARTICLE · 402

Y-Fast Trie

Y-fast trie for integer sets.

Read article
ARTICLE · 403

Z Algorithm

Z algorithm for string matching.

Read article
ARTICLE · 404

Zobrist Hashing

Zobrist: incremental board position hashing.

Read article
ARTICLE · 405

Zstd Compression

Zstandard compression algorithm.

Read article
ARTICLE · 406

All-Pairs Shortest Paths

Floyd-Warshall O(V³). Johnson O(V²log V + VE). Sub-cubic via Seidel, Zwick.

Read article
ARTICLE · 407

Signed Area of Polygon

Sum of cross products. Sign indicates orientation.

Read article
ARTICLE · 408

Art Gallery Theorem

Simple polygon with N vertices needs at most ⌊N/3⌋ guards to see all interior.

Read article
ARTICLE · 409

Attention Mechanism

Weight input positions by learned relevance. Backbone of GPT + BERT + all modern LLMs.

Read article
ARTICLE · 410

AVL Tree

Height-balanced BST with left/right rotations to maintain balance factor.

Read article
ARTICLE · 411

B+ Tree

All data in leaves, leaves linked. Sequential scans are trivial.

Read article
ARTICLE · 412

B-Tree

M-ary tree with keys per node = disk page size. Foundation of most database indexes.

Read article
ARTICLE · 413

Balanced Binary Tree Check

Is the tree height-balanced? O(N) with early termination.

Read article
ARTICLE · 414

Bayesian Optimization

Gaussian Process posterior + acquisition function. Sample-efficient black-box optimization.

Read article
ARTICLE · 415

Bellman-Ford

V-1 rounds of edge relaxation. Detects negative cycles.

Read article
ARTICLE · 416

Bellman-Ford

Slower than Dijkstra but handles negative edges and detects negative cycles.

Read article
ARTICLE · 417

BERT

Masked language model + next-sentence prediction. Sparked LLM era.

Read article
ARTICLE · 418

Betweenness Centrality

Fraction of shortest paths through vertex. Brandes: O(VE) instead of O(V³).

Read article
ARTICLE · 419

Breadth-First Search

BFS visits nodes in level order. Watch it happen with a queued animation.

Read article
ARTICLE · 420

BFS on Grids

Grid-specific BFS: 4/8-connectivity, boundary tricks, virtual super-node.

Read article
ARTICLE · 421

BFS on Implicit Graphs

Graph too large to materialize. Generate neighbors on the fly.

Read article
ARTICLE · 422

BFS with Augmented State

Node = (position, extra info). Grid + keys, TSP-like, portal problems.

Read article
ARTICLE · 423

0-1 BFS

Deque replaces PQ. Edges of weight 0 push to front, weight 1 to back.

Read article
ARTICLE · 424

Binary Tree In-Order Traversal

Left → Root → Right visits nodes in sorted order (for BSTs). Watch the animation.

Read article
ARTICLE · 425

Binary Tree Level-Order Traversal (BFS)

Visit nodes level by level with a queue. Powers view problems + zigzag.

Read article
ARTICLE · 426

Binary Tree Post-Order Traversal

Left → Right → Root. Perfect for tree deletion + expression evaluation.

Read article
ARTICLE · 427

Binary Tree Pre-Order Traversal

Root → Left → Right. Perfect for serialization + tree copying.

Read article
ARTICLE · 428

Bipartite Check

Bipartite iff no odd cycle. BFS 2-color test in O(V+E).

Read article
ARTICLE · 429

Bipartite Matching

Match items across two sets. Bipartite specialization + weighted assignment.

Read article
ARTICLE · 430

Bitap Algorithm

Bit tricks for pattern matching with errors. Fast for short patterns.

Read article
ARTICLE · 431

Bloom Filter

K hash functions + bit array. Definitely-not-in vs probably-in. Massive space savings.

Read article
ARTICLE · 432

Blossom Algorithm

Edmonds' blossom shrinking. Non-bipartite maximum matching in O(V·E·α(V)).

Read article
ARTICLE · 433

Bounded Knapsack

Each item has a limit. Handled via binary decomposition to reduce to 0/1.

Read article
ARTICLE · 434

Boyer-Moore

Fast pattern match in practice. Sublinear expected on random text.

Read article
ARTICLE · 435

Bridge Detection

Detect bridges as edges added. Fully online via link-cut trees.

Read article
ARTICLE · 436

Bridges + Articulation Points (Tarjan's)

Find critical edges/nodes whose removal disconnects graph. Single DFS.

Read article
ARTICLE · 437

BST Insert + Search + Delete Operations

Binary search tree fundamentals with animated insertion.

Read article
ARTICLE · 438

BST Validation

Recursively check each node against inherited bounds.

Read article
ARTICLE · 439

Build Binary Tree From Two Traversals

Preorder + Inorder OR Postorder + Inorder uniquely determines a tree.

Read article
ARTICLE · 440

Burrows-Wheeler Transform

BWT rearranges string to be more compressible. Basis of bzip2 + FM-index.

Read article
ARTICLE · 441

Cactus Graphs

Structured graph class where many NP-hard problems become polynomial.

Read article
ARTICLE · 442

Cartesian Tree

Build tree where in-order = array + heap property on values. Enables O(1) RMQ.

Read article
ARTICLE · 443

Catalan Numbers

C_n = C(2n, n) / (n+1). Counts binary trees, balanced parens, etc.

Read article
ARTICLE · 444

Katz Centrality

Sum over paths of length k, weighted by α^k. Generalizes eigenvector centrality.

Read article
ARTICLE · 445

Centroid Decomposition

Recursively split tree at centroid. Each level halves subtree size. O(log N) levels.

Read article
ARTICLE · 446

ChaCha20-Poly1305

Stream cipher + universal-hash MAC. Fast in software, no side-channels.

Read article
ARTICLE · 447

Chinese Postman Problem

Find shortest tour visiting every edge. Reduces to Eulerian + matching.

Read article
ARTICLE · 448

Batched CRT

Compute mod several small primes → combine via CRT. Avoids big-integer cost.

Read article
ARTICLE · 449

Chinese Remainder Theorem

System x ≡ aᵢ (mod nᵢ) has unique solution mod ∏nᵢ if all nᵢ coprime.

Read article
ARTICLE · 450

Personalized PageRank

PageRank biased toward preferred nodes. Foundation of recommendations.

Read article
ARTICLE · 451

SCC Condensation

Contract each SCC to node → DAG. Enables DP on SCCs.

Read article
ARTICLE · 452

Chordal Graphs

Perfect elimination ordering enables polynomial algorithms for many problems.

Read article
ARTICLE · 453

Chromatic Polynomial

P(G, k) = number of proper k-colorings. Deletion-contraction recurrence.

Read article
ARTICLE · 454

Chu-Liu-Edmonds

MST for directed graphs. Contracts min-in-edge cycles iteratively.

Read article
ARTICLE · 455

Circular Linked List

Last node points back to head. Uses in scheduling + streaming.

Read article
ARTICLE · 456

Circulation Problem

Each edge has lower + upper capacity bounds. Reduce to max-flow.

Read article
ARTICLE · 457

Closest Pair of Points

Sort by x, recurse, merge with strip check.

Read article
ARTICLE · 458

Convolutional Neural Networks

Weight sharing + local receptive fields. Image processing before ViT.

Read article
ARTICLE · 459

Coin Change

Count ways to make amount N using unlimited coins. DP.

Read article
ARTICLE · 460

CGAL + GEOS + Boost.Geometry

Robust geometry code is hard. Use libraries.

Read article
ARTICLE · 461

Connected Components

Iterate unvisited vertices, DFS from each. Component count.

Read article
ARTICLE · 462

Constrained Shortest Path

Minimize cost subject to resource budget. NP-hard, DP or Lagrangian.

Read article
ARTICLE · 463

Continued Fractions

Represent real as a₀ + 1/(a₁ + 1/(a₂ + …)). Convergents give best approximations.

Read article
ARTICLE · 464

Contraction Hierarchies

Precompute node ordering + shortcuts. Query in ms on billion-node graphs.

Read article
ARTICLE · 465

Andrew's Monotone Chain

Sort by x, build lower + upper hulls with cross-product tests.

Read article
ARTICLE · 466

Convex Hull

Smallest convex polygon containing all points. Sort by angle + linear stack scan.

Read article
ARTICLE · 467

QuickHull

Analog of quicksort. Expected O(N log N), worst O(N²).

Read article
ARTICLE · 468

Convex Layers

Compute hull, remove, repeat. All layers in O(N log N).

Read article
ARTICLE · 469

Convex Polygon Intersection

Two convex polygons: intersect in linear time via O'Rourke's chase algorithm.

Read article
ARTICLE · 470

Deep Copy List with Random Pointer

Copy list where each node has next + arbitrary random pointer.

Read article
ARTICLE · 471

Cycle Detection in Directed Graph

DFS with 3-color coloring: back edge = cycle. Or topological sort success.

Read article
ARTICLE · 472

Cycle Detection

Two-pointer meeting in cycle. O(N) time, O(1) space.

Read article
ARTICLE · 473

Cycle Detection in Undirected Graph

DFS: any edge to non-parent visited vertex = cycle. Union-Find alternative.

Read article
ARTICLE · 474

DBSCAN

Cluster = dense regions. Handles arbitrary shapes + noise. No k needed.

Read article
ARTICLE · 475

Decision Trees

Recursive binary splits minimizing impurity. Foundation of RF + GBDT.

Read article
ARTICLE · 476

DeepWalk

Predecessor to node2vec. Uniform walks + skip-gram. Foundation of graph embedding era.

Read article
ARTICLE · 477

Delaunay Triangulation

Triangulate points such that no point lies inside any triangle's circumcircle.

Read article
ARTICLE · 478

Depth-First Search

DFS goes deep before wide. Foundation of topological sort, cycle detection, and more.

Read article
ARTICLE · 479

DFS Tree

During DFS, edges classify as tree, back, forward, cross. Foundation of many algorithms.

Read article
ARTICLE · 480

Dial's Algorithm

Bucket queue instead of PQ. O(E + V×C) for max weight C.

Read article
ARTICLE · 481

Diffie-Hellman

Alice + Bob agree on shared secret via public messages. No prior sharing needed.

Read article
ARTICLE · 482

Digital Signatures

Non-repudiation + integrity + authenticity. Foundation of PKI + software distribution.

Read article
ARTICLE · 483

Bidirectional Dijkstra

Run Dijkstra from source AND target. Meet in middle. 2x+ speedup.

Read article
ARTICLE · 484

Dijkstra's Algorithm

Single-source shortest paths with non-negative weights. Priority queue + relaxation.

Read article
ARTICLE · 485

Dijkstra with Fibonacci Heap

Amortized O(1) decrease-key gives Dijkstra its theoretical best.

Read article
ARTICLE · 486

Dijkstra's Shortest Path

Priority queue + edge relaxation give shortest paths from source in weighted graphs.

Read article
ARTICLE · 487

Dijkstra with Potentials

Add potential function → shifted edge weights → efficient repeated queries.

Read article
ARTICLE · 488

Dinic's Algorithm

BFS to build level graph, DFS for blocking flow. O(V²·E). O(E·√V) on bipartite.

Read article
ARTICLE · 489

Dominator Tree

u dominates v iff every path from root passes u. Tree structure. Compilers use it.

Read article
ARTICLE · 490

Doubly Linked List

Prev + next pointers enable O(1) removal given node reference.

Read article
ARTICLE · 491

0/1 Knapsack Problem

The classic knapsack: fill a 2D DP table row by row.

Read article
ARTICLE · 492

Burst Balloons

Choose burst order to maximize coins. Reverse-thinking interval DP.

Read article
ARTICLE · 493

Coin Change

Min coins to make amount + count ways to make amount. Same problem, different DP.

Read article
ARTICLE · 494

Egg Drop Problem

Find minimum trials to identify critical floor with limited eggs.

Read article
ARTICLE · 495

Fibonacci

The canonical DP intro problem: recursion tree, memoization, tabulation, and space optimization.

Read article
ARTICLE · 496

House Robber Problem

Non-adjacent selection problem with elegant O(1) space.

Read article
ARTICLE · 497

Dynamic Programming

The four-step DP framework, visualized with a live-filling table.

Read article
ARTICLE · 498

Longest Common Subsequence (LCS)

Find the longest sequence appearing in both strings, in order.

Read article
ARTICLE · 499

Matrix Chain Multiplication

Optimal parenthesization for matrix multiplication order.

Read article
ARTICLE · 500

Maximum Subarray Sum

Elegant O(N) DP for max contiguous sum.

Read article
ARTICLE · 501

Optimal Binary Search Tree

Build a BST with minimum expected search cost given key frequencies.

Read article
ARTICLE · 502

Paint House Problem

Paint N houses with 3 colors, no two adjacent same. Classic state DP.

Read article
ARTICLE · 503

Palindrome Partitioning

Partition string into palindromes with minimum cuts. Two DPs combined.

Read article
ARTICLE · 504

Partition Equal Subset Sum

Can we partition array into two equal-sum subsets? Subset-sum problem.

Read article
ARTICLE · 505

Regular Expression Matching

Match string against pattern with . and * — 2D DP handles it elegantly.

Read article
ARTICLE · 506

Best Time to Buy and Sell Stock

Buy + sell with cooldown, transaction fee, or k transactions — state machine DP handles all.

Read article
ARTICLE · 507

Unique Paths in Grid

Number of paths from top-left to bottom-right, only moving right or down.

Read article
ARTICLE · 508

Word Break Problem

Can a string be segmented into dictionary words? 1D DP with substring lookups.

Read article
ARTICLE · 509

ECDSA

Elliptic curve version of DSA. Bitcoin + TLS use it. Requires cryptographic randomness.

Read article
ARTICLE · 510

Ed25519

Fast, secure, small signatures. Bernstein's design. SSH + JWT + modern protocols.

Read article
ARTICLE · 511

Edit Distance

Min insert/delete/replace to transform s into t. O(N·M) DP.

Read article
ARTICLE · 512

Edmonds-Karp

Ford-Fulkerson with shortest augmenting path (BFS). O(V·E²).

Read article
ARTICLE · 513

Eigenvector Centrality

Score = eigenvector of adjacency matrix. High score = connected to other high scores.

Read article
ARTICLE · 514

Elliptic Curve Cryptography (ECC)

Groups on elliptic curves enable smaller keys with same security. Standard in modern crypto.

Read article
ARTICLE · 515

Epidemic Models on Networks

How disease spreads via graph structure. Basic reproduction number R₀.

Read article
ARTICLE · 516

Euclidean Algorithm

Ancient algorithm. gcd(a, b) = gcd(b, a mod b). Foundation of number theory.

Read article
ARTICLE · 517

Euclidean MST

MST on complete graph of points. O(N log N) via Delaunay triangulation.

Read article
ARTICLE · 518

Euler's Totient Function

Number of integers in [1, n] coprime to n. Core of RSA.

Read article
ARTICLE · 519

Euler Tour Technique

Flatten tree into array via DFS enter/exit times. Range queries → subtree queries.

Read article
ARTICLE · 520

Eulerian Path

Find path using each edge exactly once. Linear time.

Read article
ARTICLE · 521

Expander Graphs

Constant-degree graphs with rapid mixing. Fundamental in CS + math.

Read article
ARTICLE · 522

Extended Euclidean Algorithm

Compute gcd + x, y such that a·x + b·y = gcd(a, b). Foundation of modular inverses.

Read article
ARTICLE · 523

Fast Fourier Transform (FFT)

Compute DFT in O(N log N). Foundation of signal processing + fast multiplication.

Read article
ARTICLE · 524

Fast Polynomial Multiplication

Multiply degree-N polynomials in O(N log N). Beats schoolbook O(N²).

Read article
ARTICLE · 525

Fenwick Tree (BIT)

Simpler than segment tree, same O(log N) prefix sums + point updates.

Read article
ARTICLE · 526

2D Fenwick Tree

BIT extended to 2D: O((log N)²) per op.

Read article
ARTICLE · 527

Fibonacci Computation

F_n in O(log n): matrix power or fast doubling.

Read article
ARTICLE · 528

Find Middle of Linked List

Single pass, two pointers. Slow ends at middle when fast hits end.

Read article
ARTICLE · 529

Finger Tree

2-3 tree variant with 'fingers' giving O(1) access to both ends.

Read article
ARTICLE · 530

Flood Fill

Fill connected region of same value. Paint bucket tool.

Read article
ARTICLE · 531

Floyd-Warshall

O(V³) DP over intermediate vertices. Works with negative weights (no negative cycles).

Read article
ARTICLE · 532

Fractional Cascading

Precompute pointers between sorted lists to eliminate repeated binary searches.

Read article
ARTICLE · 533

Fractional Knapsack

Sort by value/weight ratio, take highest ratio first. O(N log N).

Read article
ARTICLE · 534

Gabow's SCC Algorithm

Alternative to Tarjan's low-link. Uses two stacks, single DFS.

Read article
ARTICLE · 535

Game Tree Search

Two-player zero-sum games. Depth-limited search with pruning.

Read article
ARTICLE · 536

Gas Station Circular Route

Find starting station to complete circular route. Elegant O(N) greedy.

Read article
ARTICLE · 537

Girvan-Newman

Iteratively remove highest-betweenness edges. Reveals hierarchical community structure.

Read article
ARTICLE · 538

Gomory-Hu Tree

One tree encodes minimum s-t cut for every pair. N-1 max-flow calls.

Read article
ARTICLE · 539

GPT

Autoregressive next-token prediction. Foundation of ChatGPT/Claude/Gemini.

Read article
ARTICLE · 540

Gradient Boosting

Sequential boosting. Each tree fits residuals. Winner of most Kaggle tabular competitions.

Read article
ARTICLE · 541

Gradient Descent

First-order optimization. Foundation of neural network training.

Read article
ARTICLE · 542

Graph Attention Networks (GAT)

Attention over neighbors. Weights not uniform — learned per edge.

Read article
ARTICLE · 543

Graph Diameter

Max over all (u,v) of dist(u,v). Various tricks + approximations.

Read article
ARTICLE · 544

Graph Isomorphism

Determine if two graphs are structurally identical. Neither P nor NP-hard (unknown).

Read article
ARTICLE · 545

Graph Kernels

Kernel functions comparing two graphs. Used in SVMs for graph classification.

Read article
ARTICLE · 546

Graph Neural Networks

Aggregate neighbor features. Layer-wise propagation. Standard GNN framework.

Read article
ARTICLE · 547

Group Knapsack

Items partitioned into groups. Pick at most 1 from each. Common in course scheduling.

Read article
ARTICLE · 548

Half-Plane Intersection

Intersect N half-planes → convex polygon. O(N log N) via duality.

Read article
ARTICLE · 549

Hamiltonian Path

Backtracking + bitmask DP for small N.

Read article
ARTICLE · 550

HITS Algorithm

Kleinberg's dual model: hubs point to authorities, authorities pointed to by hubs.

Read article
ARTICLE · 551

HMAC

Key + hash → MAC. Prevents length extension attacks. Standard authentication.

Read article
ARTICLE · 552

HNSW

Multi-layer graph. Sub-log ANN queries. Powers Pinecone, Qdrant.

Read article
ARTICLE · 553

Homomorphic Encryption

Add/multiply encrypted values without decrypting. Cloud privacy compute.

Read article
ARTICLE · 554

Hopcroft-Karp

Find multiple augmenting paths per phase. Best bipartite matching bound.

Read article
ARTICLE · 555

Huffman Coding

Combine two least-frequent nodes repeatedly. Builds optimal variable-length code.

Read article
ARTICLE · 556

Hungarian Algorithm

Weighted bipartite matching in O(V³). Classical optimization.

Read article
ARTICLE · 557

Influence Maximization

Pick K seed nodes to maximize spread in social network. NP-hard, 63% approx.

Read article
ARTICLE · 558

Integer Partitions

P(n) = number of ways to write n as sum of positive integers. Euler's pentagonal recurrence.

Read article
ARTICLE · 559

Interval Graphs

Graph class with polynomial-time coloring, max clique, indep set.

Read article
ARTICLE · 560

Interval Merging + Meeting Rooms

Two classic interval problems solved by sorting + linear scan.

Read article
ARTICLE · 561

Interval Tree

Augmented BST enabling all-overlaps-with query in O(log N + K).

Read article
ARTICLE · 562

ISAP

Practical max-flow: BFS heights + gap heuristic. Often fastest.

Read article
ARTICLE · 563

Iterative Deepening DFS

DFS with increasing depth limit. Space O(d), finds shortest first.

Read article
ARTICLE · 564

Iterative DFS

Manual stack for large graphs. Same result as recursive.

Read article
ARTICLE · 565

Job Scheduling with Deadlines

Maximize profit scheduling jobs with deadlines + single machine.

Read article
ARTICLE · 566

Johnson's Algorithm

Bellman-Ford + reweighting + Dijkstra × V. Beats Floyd-Warshall on sparse graphs.

Read article
ARTICLE · 567

Karger's Min Cut

Repeatedly contract random edges. With prob ≥ 2/n², preserves min cut.

Read article
ARTICLE · 568

Karp's Minimum Mean Cycle Algorithm

Find cycle with minimum mean edge weight. O(VE).

Read article
ARTICLE · 569

K-d Tree

Partition K-dimensional space alternating axis at each level.

Read article
ARTICLE · 570

k-d Tree

Recursive space partition. NN in O(log N) expected on low dimensions.

Read article
ARTICLE · 571

Electrical Networks + Graph Theory

Effective resistance = graph theoretic quantity. Powers many algorithms.

Read article
ARTICLE · 572

k-means Clustering

Assign points to nearest centroid, recompute centroids, repeat. O(N·k·d·iterations).

Read article
ARTICLE · 573

KMP Algorithm

Knuth-Morris-Pratt. Failure function avoids rechecking. Linear-time substring search.

Read article
ARTICLE · 574

k-Nearest Neighbors (kNN)

Predict from majority of k nearest training points. Simple non-parametric.

Read article
ARTICLE · 575

Kosaraju's Algorithm

DFS on graph + DFS on reverse graph. Two passes yield strongly connected components.

Read article
ARTICLE · 576

Kruskal's Minimum Spanning Tree

Sort edges + Union-Find gives MST in O(E log E).

Read article
ARTICLE · 577

Kth Smallest in BST

In-order traversal with early termination.

Read article
ARTICLE · 578

Kuhn's Algorithm

Simplest maximum bipartite matching. O(V·E). Interviews standard.

Read article
ARTICLE · 579

Label Propagation

Each node adopts label most common among neighbors. O(V+E) per iteration.

Read article
ARTICLE · 580

Fast Laplacian Solvers

Solve L x = b in Õ(m log n) time. Foundation of modern graph algorithms.

Read article
ARTICLE · 581

LCP Array

Longest common prefix between consecutive suffixes in sorted order. O(N) given SA.

Read article
ARTICLE · 582

Legendre + Jacobi Symbols

Generalized quadratic-residue predicates. Enable primality tests + reciprocity.

Read article
ARTICLE · 583

LFU Cache

Evict item with lowest access count. Complex O(1) implementation.

Read article
ARTICLE · 584

Line Segment Intersection

Find all K intersections of N segments in O((N+K) log N) via sweep line.

Read article
ARTICLE · 585

Linear Diophantine Equations

Solve ax + by = c in integers. Extended Euclidean gives all solutions.

Read article
ARTICLE · 586

Linear Regression

Predict y from X via linear model. Closed form + regularization variants.

Read article
ARTICLE · 587

Link-Cut Tree

Sleator-Tarjan structure supporting link, cut, and path queries on dynamic forest.

Read article
ARTICLE · 588

Singly Linked List

Insert, delete, search — with animation and time bounds.

Read article
ARTICLE · 589

LSH

Hash similar items to same bucket. High-dim NN in sublinear time.

Read article
ARTICLE · 590

Logistic Regression

Sigmoid + cross-entropy. Linear model for classification. Interpretable coefficients.

Read article
ARTICLE · 591

Longest Common Subsequence

Longest sequence appearing in both strings (not necessarily contiguous). O(N·M).

Read article
ARTICLE · 592

Longest Common Substring

Longest contiguous common substring. O(N+M) via SA of concatenation.

Read article
ARTICLE · 593

Longest Palindromic Subsequence

Longest subsequence (not contiguous) that's a palindrome. O(N²) DP.

Read article
ARTICLE · 594

Longest Path in DAG

Longest path is NP-hard in general graphs but polynomial in DAG. Topological DP.

Read article
ARTICLE · 595

Longest Repeated Substring

Longest substring appearing ≥ 2 times. Max LCP in suffix array.

Read article
ARTICLE · 596

Louvain Algorithm

Greedy + hierarchical merging. Standard for large-scale community detection.

Read article
ARTICLE · 597

Lowest Common Ancestor (LCA)

Recursive, binary lifting, and Euler tour + RMQ approaches.

Read article
ARTICLE · 598

LRU Cache

O(1) get + put + eviction with the classic combined data structure.

Read article
ARTICLE · 599

Lucas' Theorem

C(n, k) mod p via digit-by-digit multiplication in base p.

Read article
ARTICLE · 600

Manacher's Algorithm

Longest palindromic substring in O(N). Beats O(N²) DP.

Read article
ARTICLE · 601

Matrix Exponentiation

Compute Fibonacci-like recurrence terms in O(log N) via matrix power.

Read article
ARTICLE · 602

Matrix-Tree Theorem

Number of spanning trees = any cofactor of Laplacian matrix.

Read article
ARTICLE · 603

Max Flow

Augmenting paths + residual graph give max flow through network.

Read article
ARTICLE · 604

Maximum Flow

Push flow from source to sink until no augmenting path. Foundation of flow algorithms.

Read article
ARTICLE · 605

Max-Flow Min-Cut Theorem

Max flow = min cut. Powerful duality with applications everywhere.

Read article
ARTICLE · 606

Max Flow via Electrical Flows

Modern max flow using electrical network + Laplacian solvers.

Read article
ARTICLE · 607

Maximum Independent Set

Find largest vertex set with no edges. NP-hard, but practical algorithms exist.

Read article
ARTICLE · 608

Min-Cost Flow via Cost Scaling

Polynomial in log(max cost). Best theoretical bound.

Read article
ARTICLE · 609

Merge K Sorted Lists

PriorityQueue over K heads. Total O(N log K).

Read article
ARTICLE · 610

Merge Sort Tree

Segment tree where each node stores sorted merge of its range.

Read article
ARTICLE · 611

Merge Two Sorted Lists

Merge sorted linked lists in-place, O(N+M).

Read article
ARTICLE · 612

Miller-Rabin

Test if n is prime via Fermat-like tests. Fast + accurate.

Read article
ARTICLE · 613

Min-Cost Bipartite Matching

Sub-cubic algorithms via cost scaling + push-relabel.

Read article
ARTICLE · 614

Min-Cost Max Flow

Max flow with minimum cost. Each edge has capacity + cost.

Read article
ARTICLE · 615

Layered Graph Techniques

Split graph into K layers. Enables constraint tracking via edges between layers.

Read article
ARTICLE · 616

Mo's Algorithm

Sort queries + linear pointer movement. O((N + Q) × sqrt(N)) total.

Read article
ARTICLE · 617

Dirichlet Convolution + Multiplicative Functions

Convolution of number-theoretic functions. Möbius function inverts.

Read article
ARTICLE · 618

Modular Exponentiation

Compute aⁿ mod m in O(log n) via binary exponentiation.

Read article
ARTICLE · 619

Modularity

Q measures how much better than random the community structure is.

Read article
ARTICLE · 620

Monte Carlo Tree Search (MCTS)

Random simulations + tree expansion. Behind AlphaGo + modern game AI.

Read article
ARTICLE · 621

Morris Traversal

Threading trick lets us traverse without stack or recursion.

Read article
ARTICLE · 622

Motion Planning

Sample-based path planning in configuration space. Robotics workhorse.

Read article
ARTICLE · 623

Multi-Party Computation (MPC)

N parties compute f(x1,...,xN) without revealing inputs. Foundation of privacy-preserving compute.

Read article
ARTICLE · 624

Multi-Commodity Flow

K different commodities share capacity. LP-based, NP-hard variants.

Read article
ARTICLE · 625

Multi-Source BFS

Initialize BFS with all sources at distance 0. Compute distance to nearest source.

Read article
ARTICLE · 626

Multi-Dimensional Knapsack

Add weight + volume + budget → multi-dim DP.

Read article
ARTICLE · 627

Naive Bayes

Assume feature independence given class. Fast + surprisingly competitive.

Read article
ARTICLE · 628

Network Reliability

Given edge failure probabilities, probability s connected to t. #P-hard exact.

Read article
ARTICLE · 629

Backpropagation

Compute gradients w.r.t. all weights in O(1) forward + backward passes.

Read article
ARTICLE · 630

node2vec

Biased random walks + skip-gram. Learn continuous node representations.

Read article
ARTICLE · 631

Number of Islands

Count connected land regions. Variants: max area, distinct shapes, sinking.

Read article
ARTICLE · 632

OAuth 2.0 + OpenID Connect

Delegated authorization + authentication. Powers 'Sign in with Google/Apple'.

Read article
ARTICLE · 633

Odd Cycle Transversal

Min vertex set whose removal makes graph bipartite. NP-hard, FPT algorithms.

Read article
ARTICLE · 634

Offline Dynamic Connectivity

Answer connectivity queries with edge additions AND deletions in offline setting.

Read article
ARTICLE · 635

Robust Orientation Predicate

Cross product with adaptive precision. Prevents floating-point bugs.

Read article
ARTICLE · 636

PageRank

Random surfer model. Eigenvector of link matrix. Power iteration.

Read article
ARTICLE · 637

Eertree

Data structure containing all distinct palindromes. O(N) build.

Read article
ARTICLE · 638

Password Hashing

Slow, memory-hard functions defeat GPU/ASIC attackers.

Read article
ARTICLE · 639

Key Derivation Functions

Derive cryptographic keys from passwords or other keys. Standard building blocks.

Read article
ARTICLE · 640

Path Sum Problems Family

Root-to-leaf, any path, path count with sum — all one recursion pattern.

Read article
ARTICLE · 641

PCA

Find directions of max variance. Linear dim reduction + decorrelation.

Read article
ARTICLE · 642

Percolation Theory

Fluid through porous media = random subgraph connectivity. Critical thresholds.

Read article
ARTICLE · 643

Perfect Graphs

Chromatic = clique number for every induced subgraph. Polynomial coloring.

Read article
ARTICLE · 644

Perfect Squares

Lagrange's four-square theorem: always ≤ 4. DP finds exact minimum.

Read article
ARTICLE · 645

Permutations + Combinations Backtracking

Generate all permutations/combinations/subsets systematically.

Read article
ARTICLE · 646

Persistent Segment Tree

Create versioned segment trees sharing unchanged nodes. Query any historical state.

Read article
ARTICLE · 647

Piece Table

Original buffer + insertion buffer + list of pieces = fast text editing without huge copies.

Read article
ARTICLE · 648

Planar Max Flow

In planar graphs, max flow reduces to shortest path in dual graph.

Read article
ARTICLE · 649

Planarity Testing

Determine if graph can be drawn without edge crossings. O(V+E).

Read article
ARTICLE · 650

Point in Polygon

Cast horizontal ray, count intersections. Odd → inside.

Read article
ARTICLE · 651

Point-to-Line + Point-to-Segment Distance

Fundamental primitives. Cross product for line, project + clamp for segment.

Read article
ARTICLE · 652

Populate Next Right Pointers in Binary Tree

Connect all nodes at same level using O(1) extra space.

Read article
ARTICLE · 653

Post-Quantum Hash-Based Signatures

Signatures from hash functions alone. Slower but conservative security assumption.

Read article
ARTICLE · 654

Post-Quantum Crypto

Learning With Errors problem. NIST PQC winners. Coming to TLS + SSH.

Read article
ARTICLE · 655

Post-Quantum Migration Strategy

Hybrid mode, crypto-agility, roadmap. Real deployment guidance for 2025-2030.

Read article
ARTICLE · 656

Prim's MST

Priority queue-based MST alternative to Kruskal's.

Read article
ARTICLE · 657

Prime Counting Function π(x)

Number of primes ≤ x. Meissel-Mertens O(x^(2/3)) computation.

Read article
ARTICLE · 658

Prime Factorization

Randomized factorization in O(N^(1/4)) expected. Finds small factors fast.

Read article
ARTICLE · 659

Primitive Roots + Discrete Log

Generator of ℤ*/p. Discrete log is one-way function of crypto.

Read article
ARTICLE · 660

Priority Queue via Binary Heap

Array-based heap with sift-up + sift-down. Foundation of Dijkstra, Prim, event schedulers.

Read article
ARTICLE · 661

Prüfer Sequence

Encode any labeled tree on n vertices as (n-2)-tuple. Foundation of tree counting.

Read article
ARTICLE · 662

Push-Relabel Max Flow

Excess flow + height labels. O(V²·√E) FIFO variant. Very fast in practice.

Read article
ARTICLE · 663

Quadratic Residues + Tonelli-Shanks

√a mod p. Legendre symbol for existence. Tonelli-Shanks for computation.

Read article
ARTICLE · 664

Quadtree + Octree

Divide 2D into 4 quadrants (quadtree) or 3D into 8 octants (octree) recursively.

Read article
ARTICLE · 665

R-Tree

Group nearby objects into minimum bounding rectangles hierarchically.

Read article
ARTICLE · 666

Rabin-Karp

Rolling hash slides through text. O(N+M) expected, O(NM) worst.

Read article
ARTICLE · 667

Rabin-Karp

Hash the pattern once + slide a rolling window over text. Great for multi-pattern.

Read article
ARTICLE · 668

Radix (Patricia) Tree

Trie with single-child chains compressed. Space-efficient IP routing.

Read article
ARTICLE · 669

Random Forest

N trees on bootstrap samples + random feature subsets. Robust, no-tuning ensemble.

Read article
ARTICLE · 670

Erdős-Rényi Random Graphs

G(n, p): each edge exists independently with probability p. Phase transitions.

Read article
ARTICLE · 671

Random Spanning Tree

Uniformly random spanning tree via loop-erased random walks.

Read article
ARTICLE · 672

Random Walks

Foundation of many graph algorithms. Cover time, mixing time, hitting time bounds.

Read article
ARTICLE · 673

Range Tree

Nested BSTs enable O(log^d N + K) range queries in d dimensions.

Read article
ARTICLE · 674

Red-Black Tree

The five properties that keep the tree logarithmically balanced.

Read article
ARTICLE · 675

Regex Engines

NFA construction + simulation → linear time. Backtracking → catastrophic.

Read article
ARTICLE · 676

Q-Learning

Learn action-value function Q(s, a) via Bellman updates. Foundation of DQN.

Read article
ARTICLE · 677

Reservoir Sampling

Sample k items uniformly from a stream of unknown length using only O(k) memory.

Read article
ARTICLE · 678

Reverse-Delete MST

Sort edges descending, delete each if graph stays connected.

Read article
ARTICLE · 679

Reverse a Linked List

Three-pointer iterative reverse in O(N) with O(1) extra space.

Read article
ARTICLE · 680

RNN, LSTM, GRU

Recurrent networks. LSTM/GRU solve vanishing gradient. Legacy but foundational.

Read article
ARTICLE · 681

Rod Cutting

Cut rod of length N to maximize revenue from price table. Same as unbounded knapsack.

Read article
ARTICLE · 682

Rope

Balanced binary tree of string fragments enables O(log N) insert/delete on huge strings.

Read article
ARTICLE · 683

Rotating Calipers

Sweep antipodal points around convex hull. O(N) after hull.

Read article
ARTICLE · 684

OSPF Routing

Link-state protocol runs Dijkstra on router LSDB. Foundation of IP routing.

Read article
ARTICLE · 685

RSA

Encrypt/sign via modular exponentiation. Security relies on factoring hardness.

Read article
ARTICLE · 686

Scale-Free Networks

Power-law degree distribution. Preferential attachment generates them.

Read article
ARTICLE · 687

Second-Best MST

Find MST → try replacing each MST edge with cheapest non-tree edge closing cycle.

Read article
ARTICLE · 688

Shamir's Secret Sharing

Threshold sharing: any t of n shares reconstruct secret. Information-theoretic security.

Read article
ARTICLE · 689

Segment Tree Beats

Handle 'set to min(a[i], x)' style range ops in near-O(log² N).

Read article
ARTICLE · 690

Segment Tree for Geometry

Range queries on intervals + rectangles via segment tree extensions.

Read article
ARTICLE · 691

Segment Tree

Build in O(N), query + update ranges in O(log N). Foundation of range-based DS.

Read article
ARTICLE · 692

SHA Family

Cryptographic hash functions. SHA-1 broken. SHA-2 dominant. SHA-3 different design.

Read article
ARTICLE · 693

Grid Shortest Path Variants

Grid problems with diagonals, diverse costs, teleports.

Read article
ARTICLE · 694

Detecting Negative Cycles

V-th round improvement → negative cycle. Then trace it.

Read article
ARTICLE · 695

Shortest Path with Waypoints

Visit set of intermediate points. TSP-adjacent.

Read article
ARTICLE · 696

SSSP with Negative Edges

Bellman-Ford, SPFA, Goldberg's algo. Different trade-offs.

Read article
ARTICLE · 697

Side-Channel Attacks

Extract secrets from physical/timing behavior. Constant-time crypto defends.

Read article
ARTICLE · 698

Sieve of Eratosthenes

Classical prime sieve. O(N log log N).

Read article
ARTICLE · 699

Skip List

Multi-level linked list with random height. O(log N) with simple code.

Read article
ARTICLE · 700

Small-to-Large Merging

Always merge smaller into larger. Achieves O(N log² N) total for problems like distinct colors in subtree.

Read article
ARTICLE · 701

Small-World Networks

Short average path + high clustering. Models social + biological networks.

Read article
ARTICLE · 702

Smallest Enclosing Circle

Randomized O(N) expected. Minimum-radius circle containing all points.

Read article
ARTICLE · 703

Sort Linked List

Split, sort halves, merge. Only algorithm that beats O(N²) on linked lists.

Read article
ARTICLE · 704

Spectral Clustering

Use eigenvectors of graph Laplacian → k-means in eigenspace.

Read article
ARTICLE · 705

SPFA

Queue-based Bellman-Ford. Often 4x faster in practice, same worst case.

Read article
ARTICLE · 706

Splay Tree

Every access moves the node to the root. Amortized O(log N) with no explicit balance data.

Read article
ARTICLE · 707

Steiner Tree

MST connects ALL vertices. Steiner connects TERMINALS — can add auxiliary Steiner nodes.

Read article
ARTICLE · 708

Stern-Brocot Tree

Binary tree containing every positive rational in lowest terms exactly once.

Read article
ARTICLE · 709

Stoer-Wagner

O(V³) or O(VE + V² log V). No source-sink pair needed.

Read article
ARTICLE · 710

String Hashing

H(s) = s[0]·b^(n-1) + s[1]·b^(n-2) + ... mod p. O(1) substring hash after O(N) preprocessing.

Read article
ARTICLE · 711

Wildcard Matching via FFT

Pattern with '?' wildcards. FFT enables O((N+M) log(N+M)) match.

Read article
ARTICLE · 712

Strong Bridges + Strong Articulation Points

Directed analogs: edges/vertices whose removal disconnects the SCC structure.

Read article
ARTICLE · 713

Subset Sum Backtracking

For huge sums or non-integer values, backtracking with pruning beats DP.

Read article
ARTICLE · 714

Subset Sum

Does a subset with given sum exist? Count of such subsets? Both O(N × S).

Read article
ARTICLE · 715

Succinct Data Structures

Store trees/graphs in space close to information-theoretic minimum + constant-time queries.

Read article
ARTICLE · 716

Sudoku Solver

Fill 9×9 grid. Try digits, backtrack on constraint violation.

Read article
ARTICLE · 717

Suffix Array

Sort all suffixes. Enables substring queries. Building block of many string algos.

Read article
ARTICLE · 718

Suffix Arrays

Sorted array of all suffixes. Powers substring search + longest common substring.

Read article
ARTICLE · 719

Substring Search via Suffix Array Binary Search

Binary search sorted suffixes for pattern. O(M log N) matching.

Read article
ARTICLE · 720

Suffix Automaton

Smallest DFA recognizing all substrings of a string. O(N) construction.

Read article
ARTICLE · 721

Suffix Automaton

State machine accepting exactly substrings of S. O(N) construction.

Read article
ARTICLE · 722

DAWG

Minimized trie. Compresses shared suffixes. Compact dictionary storage.

Read article
ARTICLE · 723

Suffix Tree

Every suffix as a path from root. O(N) construction via Ukkonen's algorithm.

Read article
ARTICLE · 724

Suffix Tree

Trie of all suffixes, compressed. Ukkonen: build in O(N) online.

Read article
ARTICLE · 725

Sum of Root-to-Leaf Numbers

Each root-to-leaf path forms a number. Sum all such numbers.

Read article
ARTICLE · 726

Suurballe's Algorithm

Find two paths that don't share edges. Total cost minimized.

Read article
ARTICLE · 727

Support Vector Machines + Kernel Trick

Maximum-margin classifier. Kernel enables nonlinear via implicit high-dim mapping.

Read article
ARTICLE · 728

Symmetric Tree Check

Is a binary tree a mirror of itself?

Read article
ARTICLE · 729

t-SNE

Preserve local neighborhoods. Great for cluster visualization, misleading globally.

Read article
ARTICLE · 730

Target Sum

Assign +/- to each number to reach target. Reduces to subset sum.

Read article
ARTICLE · 731

Tarjan's SCC

Elegant O(V+E) algorithm using low-link values.

Read article
ARTICLE · 732

Temporal Graphs

Edges appear/disappear over time. Reachability, shortest paths richer.

Read article
ARTICLE · 733

Thorup's Algorithm

For undirected integer weights, achieves linear time via hierarchical structure.

Read article
ARTICLE · 734

TLS 1.3 Handshake

1-RTT handshake. ECDHE + certificate + AEAD. Modern secure channel.

Read article
ARTICLE · 735

Topological Sort

Linear ordering respecting DAG edges. Two classic algorithms.

Read article
ARTICLE · 736

Topological Sort

Two elegant ways to order a DAG. Basis of build systems, course scheduling.

Read article
ARTICLE · 737

Transformer

Encoder-decoder with self-attention. 2017 paper reshaped ML.

Read article
ARTICLE · 738

Traveling Salesman Problem

Bitmask DP: O(2^N × N²) beats brute-force O(N!).

Read article
ARTICLE · 739

Treap

BST on keys + heap on random priorities. Balance emerges from randomness.

Read article
ARTICLE · 740

Tree Diameter

Compute the diameter using height recursion.

Read article
ARTICLE · 741

Tree Isomorphism Check

Are two trees the same shape? Recursive with children permutation.

Read article
ARTICLE · 742

Tree Views

Four view problems solved with BFS + coordinate tracking.

Read article
ARTICLE · 743

Treewidth

Measures how 'tree-like' a graph is. Bounded treewidth → many NP-hard problems become linear.

Read article
ARTICLE · 744

Trie

Character-by-character tree. O(|W|) insert/search. Foundation of autocomplete + IP routing.

Read article
ARTICLE · 745

Trie (Prefix Tree)

Word storage with O(L) insert/lookup + prefix operations.

Read article
ARTICLE · 746

2-SAT via SCC

Convert clauses to implication graph, find SCCs, check consistency.

Read article
ARTICLE · 747

Union-Find with Rollback

Support undo. Union by rank only (no path compression). O(log N) per op.

Read article
ARTICLE · 748

Union-Find Variants

Union-Find (DSU) with path compression + union by rank gives near-O(1) amortized.

Read article
ARTICLE · 749

van Emde Boas Tree

Recursive structure achieving O(log log U) where U = universe size.

Read article
ARTICLE · 750

Vertex Cover

Any maximal matching yields 2-approx. Best-known unless P=NP.

Read article
ARTICLE · 751

Vertex Cover in Bipartite

Min vertex cover = max matching in bipartite graphs. Elegant duality.

Read article
ARTICLE · 752

Voronoi Diagram

Plane partitioned into cells, each containing points closest to a site.

Read article
ARTICLE · 753

Wavelet Tree

Recursive bit-vector partitioning enables rank/select/kth in O(log Σ).

Read article
ARTICLE · 754

Word2Vec

Learn word vectors from context prediction. 2013 breakthrough.

Read article
ARTICLE · 755

Word Search

Find word in 2D grid by adjacency. Classic DFS + backtracking.

Read article
ARTICLE · 756

Yen's Algorithm

Find not just shortest but K distinct shortest paths. Deviation-based.

Read article
ARTICLE · 757

Z-Algorithm

Z[i] = longest substring starting at i that matches a prefix. O(N).

Read article
ARTICLE · 758

Zero-Knowledge Proofs

Prove knowledge of secret without leaking it. Foundation of ZK-rollups + privacy tech.

Read article