Creating directed weighted edges
v [ 0 ] -> add_child ( 1 , 1 ) ; v [ 0 ] -> add_child ( 2 , 4 ) ; v [ 1 ] -> add_child ( 2 , 2 ) ; v [ 1 ] -> add_child ( 3 , 6 ) ; v [ 2 ] -> add_child ( 3 , 3 ) ; vector < int > path ( v . size ( ) ) ; vector < int > dist = dijkstraDist ( v , s , path ) ;