mirror of
https://github.com/cupcakearmy/advent-of-code.git
synced 2024-12-22 16:16:26 +00:00
11 lines
448 B
Markdown
11 lines
448 B
Markdown
# 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.
|