Dijkstra............not passing the test cases

where i m going wrong

passes sample test case but fails in final

hello @hg11110000

image

dont print distance like this (becuase map may not have all entries).
iterate from i= 1to n .
if i==src then continue

else if dist.count(i) ==0 or dist[i]==INT_MAX then print -1
else
print dist[i]

@hg11110000
pls check ur updated code here->