Question

Which statement correctly explains why Dijkstra's algorithm produces incorrect shortest-path results on graphs containing negative edge weights, even when no negative-weight cycle exists?

A Because Dijkstra's priority queue implementation cannot store or compare negative numeric keys
B Because negative edge weights cause the algorithm's internal graph representation to become cyclic, breaking termination
C Because Dijkstra greedily finalizes a vertex's shortest distance the moment it is dequeued, assuming no later-discovered path could be shorter — an assumption negative edges can violate
D Because negative weights make previously reachable vertices appear disconnected to the algorithm, causing them to be skipped entirely
E Because Dijkstra requires the cumulative weight of every path to remain positive before it can initialize its distance array
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)