Data Structures & AlgorithmsHardICPC regional · graph theory
Problem: What does the 'two-phase' Kosaraju algorithm compute?
- A. Strongly connected components
- B. Minimum spanning tree
- C. Maximum flow
- 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
- Problem: Which best describes the complexity of Dijkstra on a graph with V = 10^5 and E = 10^6 using an array instead of a heap?
- Problem: What is the Stern-Brocot tree's relevance to competitive programming?
- Problem: Which algorithm finds all integer points on the convex hull boundary of a set of points?
- Problem: What is the purpose of the 'sqrt decomposition' technique for an array?
- Problem: Which statement about the 'Chinese remainder theorem' is correct for non-coprime moduli?
- Problem: What is the complexity of computing the Euler totient for all numbers up to n with a linear sieve?