Java: In Java, which comparison about Topological Sort is accurate?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

In Java, which comparison about Topological Sort is accurate?

  1. There is no practical difference in behavior, performance, or API design when Topological Sort is involved.
  2. The oldest option related to Topological Sort is always the right production choice regardless of context.
  3. Differences around Topological Sort are mostly cosmetic, so correctness and maintainability do not change.
  4. 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