Concepts7

βš™οΈ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
βš™οΈ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

Dijkstra's Algorithm

Dijkstra's algorithm finds shortest path distances from one source to all vertices when all edge weights are non-negative.

#dijkstra#shortest path#greedy+11
βš™οΈAlgorithmIntermediate

Dijkstra - Variations and Applications

Dijkstra’s algorithm can be adapted to track the second shortest path by keeping the best and second-best distances per vertex.

#dijkstra#second shortest path#k shortest paths+12
βš™οΈAlgorithmIntermediate

Greedy Algorithms

Greedy algorithms build a solution step by step by always taking the best local choice available.

#greedy algorithms#activity selection#interval scheduling+12
πŸ—‚οΈData StructureIntermediate

Priority Queue (Heap)

A priority queue returns the highest-priority element first and is efficiently implemented by a binary heap.

#priority queue#binary heap#min-heap+11