Question
In Java, which comparison about Topological Sort is accurate?
- There is no practical difference in behavior, performance, or API design when Topological Sort is involved.
- The oldest option related to Topological Sort is always the right production choice regardless of context.
- Differences around Topological Sort are mostly cosmetic, so correctness and maintainability do not change.
- It applies only to directed acyclic graphs, unlike general traversals that work even when cycles exist.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: D. It applies only to directed acyclic graphs, unlike general traversals that work even when cycles exist.
It applies only to directed acyclic graphs, unlike general traversals that work even when cycles exist. This is the comparison that usually separates memorization from understanding.
Track: Java