advent-of-code/2024/03/findings.md

11 lines
448 B
Markdown
Raw Permalink Normal View History

2024-12-08 20:36:04 +00:00
# Day 3
Of course 1 min of regex freestyle (`mul\(\d+,\d+\)`) and it would have been done, i wanted to do it on my own.
NVM did it with Regex xD
Part 2 was fun, I basically computed an array of the `do()` and `don't()` index and simply looked up which one was further up.
## Other ways
I think a way more efficient way to go about it would to take more of a scan approach, where we keep track of the enabled/disabled status and parse as we go.