Limit to at most k stops => at most k+1 edges. Use Bellman-Ford style relaxations by edge count.
dist[i] = best price to i using up to current number of edges.
Repeat k+1 rounds:
dist to nextDist.dist only.
Return dist[dst].Each round adds one more allowed edge; copying prevents using more than that per round.
Limit to at most k stops => at most k+1 edges. Use Bellman-Ford style relaxations by edge count.
dist[i] = best price to i using up to current number of edges.
Repeat k+1 rounds:
dist to nextDist.dist only.
Return dist[dst].Each round adds one more allowed edge; copying prevents using more than that per round.