Skip to content
GraphsFlowadvanced

Max Flow

Finds the greatest flow that can be pushed from a source to a sink without exceeding any edge's capacity. Each round takes the shortest remaining augmenting path and saturates it. Pushing flow forward opens up backward residual capacity, which is how a later round can undo an earlier greedy choice.

Best
O(VE)
Average
O(VE²)
Worst
O(VE²)
Space
O(V²)