All mock tests are FREE till 31 December — register to save your progress

Which of the following is application of depth- first search?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. Both topological sort and strongly connected components

Explanation

DFS finishing times give a topological sort and are used to find strongly connected components.

More Data Structures and Algorithms questions