Skip to main content

Topological Sort

This technique is used for finding a linear ordering of elements that have dependencies on each other.

How to Identify

  • Data Structure Involves: Graph, Array, HashTable, Queue
  • Question Type: Scheduling or grouping problems which have dependencies (directed edges) between items.

Example

Course Schedule

Coming Soon ...

ProblemsDifficulty
1Course ScheduleMedium
2Course Schedule IIMedium
3Sort Items by Groups Respecting DependenciesHard
4Alien Dictionary (Leetcode Premium)Hard