Copyright | (c) Eric Mertens 2021 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2021/day/15
Finding the shortest route through a cave, and then finding the shortest route through a slightly larger cave.
This solution uses Dijkstra's Algorithm to perform a shortest path search through the cave. (A* with a zero heuristic degenerates to this)
For part 2 this solution transforms the lookup coordinates rather than to build a larger cave array. The reason for this is to reduce memory pressure especially when running the search on much larger maps.