PythiloHard · 40 min · Task 94 of 100 · progress kept in this browser

Maximum flow with residual edges

Return maximum flow from source to distinct sink in a directed nonnegative integer capacity matrix. Do not mutate the matrix.

residual = [[0, 3], [0, 0]]
amount = 2
residual[0][1] -= amount
residual[1][0] += amount
print(residual)
Your task

Return maximum flow from source to distinct sink in a directed nonnegative integer capacity matrix. Do not mutate the matrix.