AI engineering glossary · Data structures algorithms
What is topological sort?
Topological sort (also called topological ordering): An ordering of the vertices of a directed acyclic graph so that every edge points from an earlier vertex to a later one. It exists only if there is no cycle and is used to schedule dependent tasks.
Topological sort: an example
With courses Maths before ML, and Python before ML, one valid order is Maths, Python, ML.
Related terms
More Data structures algorithms terms
- Traveling salesman problem
- Tree
- Tree traversal
- Trie
- Two pointers
- Union-find
- Weighted graph
- Worst-case analysis
Where you learn it
Topological sort is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.