aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2024-12-01 14:42:57 +0100
committerTimo Wilken2024-12-01 14:42:57 +0100
commiteeb0f8e92a3adf6b7f57e4bb84d0b8f5430d98fa (patch)
tree256b0861764529cc5d64222f36e52fdbc98e8a27
parent25a52a8e994b88781dc472082a1968841712bad0 (diff)
Add note about sortingHEADmaster
-rw-r--r--17/day-17.lisp3
1 files changed, 3 insertions, 0 deletions
diff --git a/17/day-17.lisp b/17/day-17.lisp
index 26c559a..81a289b 100644
--- a/17/day-17.lisp
+++ b/17/day-17.lisp
@@ -59,6 +59,9 @@ source file, since the Makefile runs from the top-level directory.")
;; Once we've reached the end and there's no chance of finding a shorter
;; path, return the shortest path.
((or (null queue)
+ ;; TODO: find a shortest path if it has the minimum cost in the
+ ;; queue currently, but it's not the first element (e.g. if there
+ ;; are more paths with equal cost sorted before it).
(equalp (vec2 (1- width) (1- height)) (city-path-coords (car queue))))
(car queue))
(ematch (pop queue)