Topological sort with cycle detection.
Unlock detailed company stats for this questionUpgrade
Similar to Course Schedule II. Coded on HackerRank with all test cases passing, followed by a follow-up question on the same problem where I explained the approach and wrote pseudocode.
Also asked as · Topological sort and finding the cycle in a graph.
Community answers
No answers contributed by the community yet.
Related questions
Course completion with topological sort.Topological sort problem.Resolve real-world dependencies with a topological-sort style graph solution.Related courses

Course

Course
Course

