Help needed in implementation of Dijkstra's algorithm

Revision en1, by samurai123, 2017-01-10 07:41:25

I was solving SHPATH on spoj LINK. It is direct implementation of dijkstra's algorithm but my code is constantly giving runtime error. The error is always occuring when it is extracting last element from priority queue. Can anybody help and tell the reason ? LINK OF CODE

Tags dijkstra, dijkstrs, all-shortest-path

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English samurai123 2017-01-10 07:41:25 392 Initial revision (published)