mirror of
https://github.com/cupcakearmy/advent-of-code.git
synced 2024-12-22 08:06:25 +00:00
448 B
448 B
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.