Dijkstra and Shortest Path Algorithms - Implementations in Python - Competitive Exam Level

Download Q&A
Q. In which scenario is Dijkstra's algorithm not suitable?
  • A. Finding the shortest path in a road network
  • B. Finding the shortest path in a graph with negative weights
  • C. Finding the shortest path in a weighted graph
  • D. Finding the shortest path in a tree
Q. What happens if Dijkstra's algorithm encounters a negative weight edge?
  • A. It will still find the shortest path.
  • B. It will fail to find a solution.
  • C. It will ignore the edge.
  • D. It will return an incorrect path.
Showing 1 to 2 of 2 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely