What is Dijkstra's algorithm?
What is Dijkstra's algorithm?
Approach: Describe greedy algorithm for shortest paths.
Algorithm for finding shortest paths from source to all vertices in graph with non-negative edge weights. Uses priority queue. Time O((V+E) log V) with binary heap.
Follow-up: What about negative weights?
Key concepts: greedy algorithm, priority queue, graph.