🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Topological Sort

In plain terms

Ordering nodes so every edge points forward.

Going deeper

Topological sort linearizes a directed acyclic graph so each node comes before those it points to, respecting dependencies. It only works without cycles.

Under the hood

O(V+E) via DFS or Kahn's algorithm; impossible if a cycle exists, which the algorithm detects.

Examples

Build systems, task scheduling, dependency resolution, course planning.

Think of it like...

Like ordering courses so every prerequisite comes before the class that needs it.

Feedback & Bug Report