I just read the Ford-Fulkerson algorithm and Edmond-Karp's and Dinic's optimization on it. Should I always use Dinic for a max flow question or is Edmond Karp good enough for most of the questions? Asking this cos Edmond Karp looks relatively easy to code.
There is no best algorithm for max-flow problems. It all depends on the constraints of the problems.
How do you know Edmond-Karp won't work for a question?
Edmonds-Karp algorithm runs in $$$O(VE^2)$$$ time
I don't understand why I'm getting downvoted, without being told why.
Anyway, Dinic's runs in $$$O(V^2E)$$$ while Edmonds-Karp's runs in $$$O(VE^2)$$$. Depending on the constraints, whether there are more vertices or more edges, that you can decide the algorithm.
Also, it's worth noticing that in practice, these algorithms can run much faster than in theory.
Ratism
"Depending on the constraints, whether there are more vertices or more edges, that you can decide the algorithm."
Where did you see a problem with flows where there are more vertices than edges?
Dinic is always better than Edmonds-Karp.
Also, there are many optimizations for Dinic, and special cases where it can be used (bipartite match or networks with unit capacities), check Wikipedia
P.S. There is also a method to get Dinic algorithm with complexity O(E^2 log) without any hard methods, when all numbers are integers. Sorry, have only Russian article Масштабирование потока.
You should make your own judgment of what to use based on what you know. Here are some facts you should consider.
Push-relabel