Discussion thread for day 6 of the Advent of Code - https://adventofcode.com/2022/day/6
Back to a more gentle challenge today - but still a good excuse to learn some regex from some of our friends.
Dirty solution attached - pending refactor.
This solution's only redeeming feature is that it is parameterised rather than hard-coded into formulae - so the one answer will work for both parts.
- Then creates the window text string for that number of characters- Then splits them into lines (one character per line)- And checks if the count of characters for that starting position = the distinct count (i.e. if there are duplicates)- And it picks the row with the lowest starting position which meets the condition.
Setting aside Day 5 problem...
Here's my solution for Day 6.
Forgot to post mine for yesterday, but here we go! No Tool Golf today.
Macro:
Ugly long formula created in notepad++ for part 2
My python solution is much cleaner than my Alteryx solution 😂 #SnakingMyWayThroughChallenges
I've officially made it farther in the challenge than I ever have in the last few years I've been attempting this 😁
Solution:
Luckily I made the macro easy to scale the only difference between Part 1 and Part 2 was the number of records I was choosing with my Select Records tool and the filter requirements.
Think my second answer is actually simpler than the first, but wasn't going to bother to rewrite the first one.
last submission for my 2022 attempts