Skip to content

Commit ce0f09d

Browse files
authored
Update minimum-cost-to-reach-destination-in-time.py
1 parent 316573b commit ce0f09d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/minimum-cost-to-reach-destination-in-time.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def minCost(self, maxTime, edges, passingFees):
2020
adj[u].append((v, w))
2121
adj[v].append((u, w))
2222
best = collections.defaultdict(lambda:float("inf"))
23+
best[0] = 0
2324
min_heap = [(passingFees[0], 0, 0)]
2425
while min_heap:
2526
result, u, w = heapq.heappop(min_heap)

0 commit comments

Comments
 (0)