Copyright | (c) Eric Mertens 2023 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2023/day/17
Shortest-path graph search where the graph states are the triple of a location, direction.
Distance traveled doesn't need to be stored because all of the distances that can be traveled from a starting location are added to the work queue at the same time for each starting point.
>>>
:{
:main + "2413432311323 3215453535623 3255245654254 3446585845452 4546657867536 1438598798454 4457876987766 3637877979653 4654967986887 4564679986453 1224686865563 2546548887735 4322674655533 " :} 102 94
>>>
:{
:main + "111111111111 999999999991 999999999991 999999999991 999999999991 " :} 59 71