Max Flow
Solves maximum flow problem.
__init__
Arguments
n: int: number of nodes
add_edge
Appends an edge with capacity to the graph.
Arguments
u: int: from nodev: int: to nodecap: int: capacity
solve
Finds the maximum flow from the source to the sink.
Arguments
s: int: source nodet: int: sink node
Returns
int: maximum flow
Complexities
where represents the number of edges added.
