sln_2022_12
Copyright(c) Eric Mertens 2022
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2022/day/12

>>> :{
:main +
    "Sabqponm\n\
    \abcryxxl\n\
    \accszExk\n\
    \acctuvwj\n\
    \abdefghi\n"
:}
31
29
Synopsis

Documentation

main :: IO () Source #

>>> :main
528
522

solve :: UArray Coord Char -> Char -> Int Source #

Given an input map and a starting letter, return the length of the shortest path to the ending letter (E).

elevation :: Char -> Char Source #

Compute the logical elevation by mapping start and end characters to their corresponding lowercase elevation values.