getting slightly incorrect output
ide: https://ide.codingblocks.com/s/202140
Bfs-shortest path
@Vishal123
hello vishal,
intialise distance of all the node with int_max,
for example
4 2
1 2
1 3
u havent intialiste node 4 with intmax
since using map , it is difficult to intialize a particular node to INT_MAX. explain how to do so
you already know the number of node i.e n and their labels i.e (1,2,3,4…n)
just do
for each labels -> dist[label]=INT_MAX