New answers tagged

1 vote

Does order of elements in a set matter in Dijkstra's Algorithm?

In general: yes. The correctness of Dijkstra's algorithm does depend on the order in which elements are extracted from the priority queue. You do need to extract them in non-decreasing order of their ...
user avatar
  • 23.9k

Top 50 recent answers are included