I have the following cpp file to compute dijkstra algorithm . I get a infinite loop at the condition check while(cur != V)
Please help me resolving this. The attached dij.in file has the following input format
v v w
where V is # of vertices, E is # of edges, followed by E lines where v are vertex numbers and w is the associated edge weight.