0

When there are multiple solutions, I want to return the solution where courses are in ascending order. How can I do that by the topological sort algorithm?

sam
  • 21
  • 5
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 10 '21 at 15:29

1 Answers1

0

Solved this using PriorityQueue in place of Queue.

sam
  • 21
  • 5