Copyright | (c) Eric Mertens 2021 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2015/day/19
We get a bunch of reaction rules and a final string. Our goal is to find the smallest application of rules to produce that final string from an initial empty string.
This solution uses dynamic programming to build the answer up out of all the most efficient ways to build the substrings of the final string out of individual starting atoms.