Part 2 complicated it, but yes. I just built regexes on the fly for Part 1. I wonder if they mean Day 13. The underlying math is based on the Chinese Remainder Theorem, but it is solvable without knowing it (or, in my case, "knowing" it, once I saw others mention it it came back but my math degree was a long time ago). A solution could be discovered incrementally without knowing the math by trying to optimize the naive version.
I did mean Day 13, thank you -- I updated my post accordingly. Sorry about the confusion!
Apologies, I updated my post. It was Day 13 where this happened. Not sure why I stopped at Day 19, tbh.
Day 13 you really needed to know of Chinese remainder theorem; I would say this was probably the only day in the last couple of years so dependent on non-trivial maths. I would still recommend AoC though.
I loved day 19 because I managed to use some Automata theory I studied at uni. Something like, I cannot simply use a regex because it's a context-free grammar. Then I learned about recursive regexes and how they could be used to parse a cfg. Aaah fascinating, really.
Re:Advent of Code 2021
by justinsaccount on Wednesday December 01, 2021 @10:34AM
(#29404699)
yep, that's what I did. simply converted the input into a regex and matched it. part 2 had to add a little special casing but ultimately not that difficult.
I didn't read it in depth, but it feels like you could build regexes on the fly to solve it. Perhaps I missed something crucial.
Edit: Ahh, day 13: https://adventofcode.com/2020/day/13