Concepts5
⚙️AlgorithmIntermediate
Problem Classification Patterns
Many competitive programming problems map to a small set of classic patterns; recognizing keywords and constraints lets you pick the right tool fast.
#problem classification#binary search on answer#two pointers+12
⚙️AlgorithmAdvanced
Minimum Cost Maximum Flow
Minimum Cost Maximum Flow (MCMF) finds the maximum possible flow from a source to a sink while minimizing the total cost paid per unit of flow along edges.
#minimum cost maximum flow#successive shortest augmenting path#reduced cost+11
⚙️AlgorithmIntermediate
SPFA (Shortest Path Faster Algorithm)
SPFA is a queue-based optimization of Bellman–Ford that only relaxes edges from vertices whose distance just improved.
#spfa#bellman-ford#shortest path+12
⚙️AlgorithmAdvanced
Johnson's Algorithm
Johnson's Algorithm computes all-pairs shortest paths on sparse graphs by first removing negative edges via reweighting, then running Dijkstra from every vertex.
#johnson's algorithm#all pairs shortest paths#apsp+12
⚙️AlgorithmIntermediate
Bellman-Ford Algorithm
Bellman–Ford finds single-source shortest paths even when some edge weights are negative.
#bellman-ford#single-source shortest paths#negative weights+12