Topological sort coding challenges

Practise topological sort with 2 coding challenges, from easy to hard. Every challenge runs in your browser with instant tests, an AI review of your code and community solutions to compare.

Hard · 2

Skills you'll practise: Cycle detectionDAG DPKahn's algorithmTopological order
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
2
Solutions shared
3
Languages

All challenges

Search by topic, language, or difficulty.

2 challenges
Hard

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

You'll learn Topological orderDAG DP
AdvancedGraphsHackathonTopological-sort
No solutions yet
Hard

Course Schedule Order

Order courses so every prerequisite comes first.

You'll learn Kahn's algorithmCycle detection
AdvancedGraphsHackathonTopological-sort
No solutions yet