Mathematics
Directed Graphs and Topological Sorting
Quick fact
A topological sort exists for a directed graph if and only if the graph has no directed cycles—such graphs are called directed acyclic graphs (DAGs). This linear ordering respects every edge direction, making it essential for scheduling tasks with prerequisites.
Why this is interesting
You need to take a set of courses, but some depend on others. How do you find a valid order to take them all?