Discussion thread for day 8 of the Advent of Code - https://adventofcode.com/2024/day/8
Eric is treating us right for the weekend! Very refreshing (Scored top 1000 for both parts today). Reading the problem felt harder than solving it:
A second straightforward day in a row. Probably too much to hope for one more in advance of Monday Morning Meetings but we'll find out in 24 hours.
This marks the only time I've ever been happy that joins are case sensitive.
Difficult part was to understand what we are asked to do rather than configuring WF today.
I might have violated Base-A...I used a pencil and paper. I love @CoG 's neat and wise WF. It's elegant.
(Edit) For part2, if linear algebra method is applied, it's successful because of:
I was just luck to have solved it without knowing this nature of data.
Wow - didn't expect this after some of the challenges we've had this week! Did almost have an absolute meltdown trying to parse the question originally though. Finished ~5k for both parts on the global leaderboard which is pretty sweet. Went overboard generating rows for P2 but hey ho, covering bases = stars apparently.
I'm sure someday I'll feel confident with grid problems, but I won't get there without practice! I spent a decent amount of time trying a spatial solution, but I didn't get very far with that.
I'm 100% sure I overcomplicated this one, but I was happy that Part 2 didn't take toooo long to get to from Part 1.
EDIT: Seeing the other (much simpler) solutions is a good lesson for me. Sometimes my mind jumps straight to macros for AoC and it doesn't need to!
For Part 2, at first I tried "Generate Rows" or "Append Fields".
As it did not seem to work well, I switched to Iterative Macro and it worked.
Done. I can sleep tonight.
Solved!
Not elegant, but work!
I was able to use the Arrange tool to stack multiple x,y elements vertically!
Day8. More in spoiler
Either Day 8 was just WAY easier (once you decipher what is being asked) than the last few problems OR I am quickly acknowledging the benefits of doing these in the middle of the day on a good night's rest 😀.
Almost went for macro again, turns out no need, just need a correct join does the job.
Workflow
Part 1
Part 2
Batch Macro
Struggle with the logic for this at first but it wasn't so horrendous in the end! Very glad to get the second star. Solved the entire day 8 whilst my day 9 part two was running...!
Done without macro.
My solution.
not sure why it is working. but it worked 😆
Solved! I went with brute force for Part 2 since I needed that square for the bingo game
Whee!
I originally skipped this one as I didn't have enough time at the weekend, but came back to it today and was able to figure out how to approach the question.
The first part was quite simple, only requiring 1 antinode each at the positive and negative end of the antenna pairing. For Part 2, I used Generate rows within the bounds of 1 and max_row to ensure that new antinodes were generated within a restricted range (which was filtered further to remove erroneous antinodes once column positions were calculated also). Wasn't entirely sure it would work so was pleasantly surprised when the answer was correct
Lulled into a sense of accomplishment - 2 down in the span of a day, and both were easy. They're toying with our emotions......
Thought of making it spatial, but straight out math was easier to actualize.
It does help to remember to switch back to your data set from the example.
This was a classy problem. Quite enjoyable!
Day 8: