Discussion thread for day 4 of the Advent of Code - https://adventofcode.com/2024/day/4
I'm still standing! Struggled on 'seeing' the diagonal part but once I did I got the rest!
Solved!
I built a solution for Part 1 that worked where I used non-macro Tools to check the rows & columns. Then I built a macro for the diagonals. Then I re-did part 1 and the macro so it could handle all 9 directions (counting not moving as a direction.... I guess I should've excluded those. Drat!)
Then Part 2 didn't need any tweaks to the macro (woohoo!) and involved an extra filter at the end.
I used a Text Input file for the values I was trying to get - e.g. "X", then "XM", then "XMA", etc. I feel like I could've done that differently but it also worked beautifully for Part 2 without any macro tweaks, so I think I'm calling that a win.
In past years, I've always solved problems like these with spatial tools. Wanted to try something different
and here is the accompanying python - part 1 is pretty awful, part 2 is sweet.
all code at SeanAdams10/AdventOfCodePython: Advent of code challenges in Python - across multiple years
Today was pretty fun...diagonal considerations through Alteryx aren't exactly straightforward but I bet they are harder with other tools!
The iterative macro is a wonderful thing! And for me, today was the first time Part 2 was way easier for me than Part 1! Once again....and I don't think this is a spoiler but when using Regex....
Also, here are my screenshots
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |