Copyright | (c) Eric Mertens 2023 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2023/day/15
This problem has us follow a lens update sequence. The solution below stores the lenses in an array and uses accumArray to efficiently apply updates to that array in-place.
>>>
:main + "rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7\n"
1320 145