There are O(n3)O(n^3)O(n3) deterministic algorithm, and O(n2log3n)O(n^2 \log^3 n)O(n2log3n) Randomized algorithm
See here it's quite nice
See also Max-flow min-cut theorem