cheapest flights within k stops

Algorithm/Python

[python/leetcode]cheapest flights within k stops/dijkstra

💬 문제 (leetcode.com/problems/cheapest-flights-within-k-stops/) There are n cities connected by m flights. Each flight starts from city u and arrives at v with a price w. Now given all the cities and flights, together with starting city src and the destination dst, your task is to find the cheapest price from src to dst with up to k stops. If there is no such route, output -1. 💬 코드 class Solution:..

박한결
'cheapest flights within k stops' 태그의 글 목록