Data Structures & AlgorithmsVery hardICPC regional · graph theory

Problem: What is the purpose of the low-link value in Tarjan's strongly connected components algorithm?

  1. A. It stores the shortest distance from the source
  2. B. It counts the edges in the component
  3. C. It sorts vertices topologically
  4. D. It records the smallest discovery index reachable from a vertex's subtree via back edges

Correct answer: D. It records the smallest discovery index reachable from a vertex's subtree via back edges

A vertex that is its own low-link is the root of an SCC, which lets the stack pop the whole component.

More Coding Interview Problems questions

Exams that ask this topic