Discussion thread for day 22 of the Advent of Code - https://adventofcode.com/2024/day/22
Good break from Day 21. Pretty much just brute force (just need to read thoroughly to ensure that all logic is captured):
A nice clean day after a dirty awful yesterday in which I left my workflow running overnight and came back to a finished not the answer.
This one highlights the things Alteryx is good at. Multi-row formulas and summation allow you to shortcut things that most (other) programming languages would find syntactically complicated.
Solved!
The question was difficult to understand, but today is straightforward!
This was a breath of fresh air, besides me spending an hour troubleshooting the fact that I only ran 1,999 iterations instead of 2,000 after reworking for P2 😅
It’s not a particularly difficult problem as long as we correctly understand the problem statement.
I struggled a bit to fully grasp the problem statement, but for P1, I followed the instructions, created the formula in the Formula Tool, and ran the loop 2000 times to get the answer.
For P2, I used a multi-row formula tool to calculate the patterns and aggregated the first digit of the price that matched the pattern for each record. Initially, I overlooked the part about "the first price that matches the pattern" and ended up confused when my answers didn’t match.
Day 22. More in spoiler
Finally a chill day