Loading content
Which algorithm finds the shortest path from a single source in a weighted graph with non-negative edge weights?
Correct Answer: C — Dijkstra's algorithm
Explanation:
Dijkstra's algorithm finds the shortest path from a single source in O((V + E) log V) for non-negative weights. Bellman-Ford handles negative weights but is slower.