dist[childPair.first].
How is this an integer and is being used in comparison??
dist[childPair.first].
How is this an integer and is being used in comparison??
hello @JaveedYara
dist is map which is storing string as its key and int as it value.
now here
dist[childPair.first].
childPair.first will give u string (name of city)
now with the help of city name we are getting its distance stored in map (dist[childPair.first] will give distance from src ).