Module advent::y2018::day5

source ·
Expand description

Alchemical Reduction (Statement). Input size parameters n: Length of input, m number of reacting units

Functions

Two units are inverses if they differ only in case (input is restricted to ASCII)
O(n*m) Reduce the given polymer to its smallest canceling inverse units
O(n*m) Find the “problem” unit, i.e. the unit which when removed from the input gives the smallest reduction