Dijkstra, Leetcode Medium, Graph, Cpp.
graph[src].insert(make_pair(dst,cost)); } } public: int findCheapestPrice(int n, VecVecI& flights, int start, int dst, int K) { //Create a Adjacency List create_weighted_graph(n, flights); vector<int> cost_from_start_node(n+1, INT_MAX); //Cost of reaching start node=0 is 0 with stops=0