From 57b2d0201d79ab06cac18a5d34c2c37eb249e954 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Wed, 15 Dec 2021 14:07:38 +0100 Subject: [PATCH] Flip is --- 15/15.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/15.py b/15/15.py index 585fcb2..c8726cc 100644 --- a/15/15.py +++ b/15/15.py @@ -28,7 +28,7 @@ def dijkstra(grid): for neighbour in neighbors(u, grid.shape): new = dist[u] + grid[neighbour] - if dist[neighbour] > new: + if new < dist[neighbour]: dist[neighbour] = new heappush(q, (new, neighbour))