Dijkstra's Algorithm finds the shortest path from a source node to all other nodes in a graph with non-negative weights. It uses a priority queue to explore nodes in order of increasing distance. This algorithm works by maintaining a set of visited nodes and, at each step, selecting the unvisited node with the smallest known distance to visit next. This process continues until all nodes have been visited, making it essential for network routing problems.
© 2025 SEE Algorithms. Code licensed under MIT, content under CC BY-NC 4.0.