787 https://leetcode.com/problems/cheapest-flights-within-k-stops/ 아주 오랫만에 보는 다익스트라 문제다. 기존에 풀던 다익스트라와 차이를 적자면, K번 stop이라는 횟수제한이 있어서 이 제한조건을 충족시켜야 한다. from collections import deque class Solution(object): def findCheapestPrice(self, n, flights, src, dst, K): adj = [[] for i in xrange(n)] for s,e,w in flights: adj[s].append([e, w]) dist = [float('inf') for i in xrange(n+1)] dist[src] = 0 q = dequ..