Skip to content
LEETFLIX

method

Topological Sort — animated LeetCode walkthroughs

LeetCode problems solved with Topological Sort. Browse the complete tag, then watch the algorithm move — step-by-step animation, Python and Go.

40 problems · 30 animated · 10 locked

Full Topo sort index

  1. 207Course ScheduleWatch
  2. 210Course Schedule IIWatch
  3. 269Alien DictionaryLocked
  4. 310Minimum Height TreesWatch
  5. 329Longest Increasing Path in a MatrixWatch
  6. 444Sequence ReconstructionLocked
  7. 631Design Excel Sum FormulaLocked
  8. 802Find Eventual Safe StatesWatch
  9. 851Loud and RichWatch
  10. 913Cat and MouseWatch
  11. 1059All Paths from Source Lead to DestinationLocked
  12. 1136Parallel CoursesLocked
  13. 1203Sort Items by Groups Respecting DependenciesWatch
  14. 1245Tree DiameterLocked
  15. 1462Course Schedule IVWatch
  16. 1591Strange Printer IIWatch
  17. 1632Rank Transform of a MatrixWatch
  18. 1728Cat and Mouse IIWatch
  19. 1786Number of Restricted Paths From First to Last NodeWatch
  20. 1857Largest Color Value in a Directed GraphWatch
  21. 1916Count Ways to Build Rooms in an Ant ColonyWatch
  22. 1976Number of Ways to Arrive at DestinationWatch
  23. 2050Parallel Courses IIIWatch
  24. 2115Find All Possible Recipes from Given SuppliesWatch
  25. 2127Maximum Employees to Be Invited to a MeetingWatch
  26. 2192All Ancestors of a Node in a Directed Acyclic GraphWatch
  27. 2204Distance to a Cycle in Undirected GraphLocked
  28. 2246Longest Path With Different Adjacent CharactersWatch
  29. 2328Number of Increasing Paths in a GridWatch
  30. 2360Longest Cycle in a GraphWatch
  31. 2371Minimize Maximum Value in a GridLocked
  32. 2392Build a Matrix With ConditionsWatch
  33. 2603Collect Coins in a TreeWatch
  34. 2876Count Visited Nodes in a Directed GraphWatch
  35. 3383Minimum Runes to Add to Cast SpellLocked
  36. 3435Frequencies of Shortest SupersequencesWatch
  37. 3481Apply SubstitutionsLocked
  38. 3530Maximum Profit from Valid Topological Order in DAGWatch
  39. 3620Network Recovery PathwaysWatch
  40. 3812Minimum Edge Toggles on a TreeWatch