This is a thread to discuss Day 6
It is VERY important NOT to write any public spoilers
ALWAYS keep spoiler stuff hidden inside one of these
This text will be hidden
which you can obtain by clicking on the gear icon
FYI one of the features of Advent of Code is that we all get given different inputs so our answers will be different.
The examples are all the same but each of us gets different inputs for us to solve
Who decided the time would be measured in milliseconds? That is no time at all, and you'd need to be very precise about the amount of time held pressing a button.
Alright the realism rant is over, now it's time to actually give my solution.
I took a different approach to finding the solution this time. I noticed a pattern, and thought about it in a mathematical way. It just looks for the minimum number of milliseconds held, then it just finds the max by doing
((total - (min) * 2) - 1))
I've got back on the horse after giving Day 5 a miss and I found Part 1 relatively easy
And I even managed to use Pipe correctly
Part 1 scripts
Managed to do Part 2 but browser locked up when saving but here are my 2 gold stars to prove it