Java: Which statement about Topological Sort is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about Topological Sort is the strongest interview answer?

  1. Topological Sort is mostly a naming style choice and has little effect on runtime or design.
  2. Topological Sort exists mainly to reduce the number of Java files in a project.
  3. Topological sort produces an order where every directed edge goes from an earlier node to a later node.
  4. Topological Sort matters only for frontend frameworks, not for core Java applications.

Hint

Start with the core rule behind Topological Sort.

Answer and rationale

Correct answer: C. Topological sort produces an order where every directed edge goes from an earlier node to a later node.

Topological sort produces an order where every directed edge goes from an earlier node to a later node. This is the base concept interviewers commonly test first.

Track: Java