What is the main signal for Graph Traversal, Cycle Detection and Topological Sort?
Practice this question from Quiz: Graph Traversal, Cycle Detection and Topological Sort, with options and an explanation.
Question
What is the main signal for Graph Traversal, Cycle Detection and Topological Sort?
Option A — Correct answer
The problem contains dependencies, prerequisites, directed edges, components, or must-use-all-edges requirements.
Option B
The input has no constraints.
Option C
The sample output is small.
Option D
The question uses only one variable.
Explanation
Pattern choice starts from constraints and invariant.