Data Structures & AlgorithmsVery hardICPC regional · flow

Problem: Which statement about the Edmonds-Karp algorithm's number of augmentations is correct?

  1. A. It is exponential in the flow value
  2. B. It is O(V E) because each edge is critical O(V) times
  3. C. It is always exactly the flow value
  4. D. It is independent of the graph size

Correct answer: B. It is O(V E) because each edge is critical O(V) times

Shortest augmenting paths keep distances non-decreasing, so each edge becomes critical at most O(V) times.

More Coding Interview Problems questions

Exams that ask this topic