Mental Model
We order tasks so that each task comes after all tasks it depends on, by repeatedly picking tasks with no unmet dependencies.
Analogy: Imagine you have a list of chores where some chores must be done before others. You start with chores that have no prerequisites, do them, then remove them from the list, revealing new chores that can now be done.
Graph nodes with arrows showing dependencies: A -> B -> C ā D In-degree counts: A:0, B:2, C:1, D:0 Queue starts with nodes having in-degree 0: [A, D]
