AI engineering glossary · Data structures algorithms
What is shortest path?
Shortest path: The problem of finding a route between two vertices in a graph with the smallest number of edges or the smallest total edge weight. Different algorithms apply depending on whether edges are weighted and whether weights can be negative.
Shortest path: an example
Finding the quickest bus route from Kolkata's Howrah to Salt Lake by minimising travel time across a weighted graph of stops.
Related terms
More Data structures algorithms terms
- Sliding window
- Sorting
- Space complexity
- Space-time trade-off
- Stable sort
- String matching
- Tabulation
- Time complexity
Where you learn it
Shortest path is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.