Subject / 609 questions

Programming MCQs

Page 12 of Programming multiple-choice questions with answers. Tap an option to check yourself.

Page 12 of 31

Advertisement
Advertisement
Question 230 Data Structures

Why can Dijkstra’s shortest-path algorithm give wrong results on a graph with negative edge weights?

Correct answer C. It finalises a vertex's distance when the vertex is removed from the queue, assuming later paths cannot be shorter

Open question
Advertisement