Skip to content

Glossary: Coding Interviews in C++

Dijkstra's shortest paths

Also written: Dijkstra, shortest paths

An algorithm that finds the cheapest route from one node to the others in a weighted graph, always expanding the closest unfinished node next. It works when edge weights are not negative.

Where the book teaches it

Related terms

GreedyTopological sort