Expand description
§Medicine for Rudolph
Part one is a brute force search and replace of every possibility with two optimizations. Replacements that add the same number of extra molecules are grouped together, as different length strings can never match.
Next replacement ranges are sorted into ascending order. Non-overlapping ranges can never match, so checking for other equals string only needs to consider ranges that intersect.
Part two uses the analysis from askalski
provided on the
Day 19 solution megathread.
Functions§
Type Aliases§
- Input 🔒