Shortest path

Also known as: Shortest paths, Pathfinding

A shortest path between two nodes minimizes the sum of edge weights (or the hop count when every weight is 1). Algorithms differ by graph assumptions:

Always state the weight model on exams. “Shortest” without weights usually means fewest edges.

← Back to CS Glossary