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.

Level: intermediateTopic: Data structures algorithms

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.