In which scenario is Dijkstra's algorithm most effectively applied?
-
Finding the shortest path in an unweighted graph
-
Finding the shortest path in a weighted graph with non-negative weights
-
Finding the longest path in a graph
-
Finding a cycle in a graph