Dijkstra, Leetcode Medium, Graph, Cpp.
cost 500. Approach-1. Single Source Shortest Path. Dijkstra Algo Logic Similar to Dijstra’s Shortest path Algo we will take minHeap<cost,node,stops> Fill neighbours, increase stops by 1. When (stops > K) continue; //ie if any node is reachable with stops > k, then its no use to consider it. Code