Data Structures & AlgorithmsHardICPC regional · graph theory

Problem: What does the 'two-phase' Kosaraju algorithm compute?

  1. A. Strongly connected components
  2. B. Minimum spanning tree
  3. C. Maximum flow
  4. D. Shortest paths from one source

Correct answer: A. Strongly connected components

The first DFS orders vertices by finish time, and the second DFS on the transpose extracts components.

More Coding Interview Problems questions

Exams that ask this topic