Advent of Code 2024 Day 10 (BaseA Style)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Discussion thread for day 10 of the Advent of Code - https://adventofcode.com/2024/day/10
- Labels:
- Advent of Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I thought part2 would be more complicated scenario, but actually not so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As suspected, @gawa, copied my solution before I even finished it XD. Well done, sir! This was a surprisingly simple problem (maybe could have swapped for Day 6?). Another excellent algorithm lesson
Main Workflow:
BFS Macro:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I always spy on you @CoG.
We will see more copy of them in this thread because this should be the most immediate approach that first comes to our mind.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The best part2 is the one you already solved while doing part 1. 
Sadly, a Macro input configuration caused me to have to rebuild the macro and kept me out of 1k again. The struggle continues.
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
today challenge is like design for alteryx.
just a tool different, so i use detour instead.
part2: do not unique it. (which for me, do not summarise it.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Day 10 is easy. I can sleep tonight.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I *distinctly* remember someone (looking at you @CoG ) telling me to read the constraints carefully. I think many people (including myself) solved part 2 first 😂
Added a "y" coordinate with 1st record tool
Regex Tokenize to Rows on \d
Select Tool to change the Topo field to byte
Multi-Row Grouped on "y" coordinate to add "x"
Split Trailheads (0's) from Trails and give each a TrailheadId
Send trailhead to macro and rest of trail to second input for macro
In the macro take the coordinates from the head and determine 1 left, right, up, and down (formula). Don't forget to constrain your moves to the First-Last Column and Row. Don't want to go out of bounds. Achieved with IF statements.
Join new coordinates to trail set
Use Filters to keep only the next relevant Topo value. Here is here iteration number is valuable for increasing the value dynamically each run.
union all the True streams (Of course I could have applied union first and used less filter tools, but meh - again tired.
Check to see if you've reached the last Topo level and send to output, otherwise return to run the next level.
Coming out of the macro you have ALL possibilities to get from a Trailhead to 9, but Part 1 wants Trailhead to Unique 9's. So apply a Unique tool by TrailheadID on the coordinate for level 9. Answer is record count.
For part 2 the ask is to sum the ratings which is made up of ALL possible paths to get from Trailhead to a 9. So take the pre-Unique tool record count..
