Maximum Flow and Minimum Cut

hard
Unit 23 · Trees & Graphs0/0 to milestone

Implement Edmonds–Karp: repeatedly find the shortest augmenting path (by number of edges) from source to sink in the residual graph with BFS, and push as much flow as its bottleneck allows.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Maximum Flow and Minimum Cut · TechGradify