Question
Given a directed graph with n nodes (0..n-1) and a list of edges [u, v, c] meaning a directed pipe from u to v with non-negative integer capacity c (parallel edges should be summed), compute the maximum flow from source s to sink t. Return the max flow value (0 if t is unreachable). Assume 1 <= n <= 200 and capacities up to a few thousand; an augmenting-path method (Edmonds-Karp) must finish well under 5s.
max_flow(n: int, edges: list[list[int]], s: int, t: int) → int[4,[[0,1,3],[0,2,2],[1,2,1],[1,3,2],[2,3,3]],0,3]out5State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.