General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2023 Day 5 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 5 of the Advent of Code - https://adventofcode.com/2023/day/5

32 REPLIES 32
SeanAdams
17 - Castor
17 - Castor

Finally got this done (took a few days to clear out the brain fog).

And built a good few AOC reusable macros in the process!

 

Spoiler
The recipe for part 2 is as follows:
- Do the prep and break stuff down.
- Create a loop for each block of translation
      - For each iteration - split the seed ranges based on overlaps with the mapping ranges.     There's a trick here - you take the mapping ranges and break them into break points, and then iteratively break up each of the seed ranges
      - For each of the newly subdivided ranges - look to see if there's a hit on the mappings and then update the ranges
      - Finally compress the ranges to get rid of overlaps


Screenshot 2023-12-09 210220.png 
DaisukeTsuchiya
13 - Pulsar

I post again with solution in yxdb.

 

Spoiler
スクリーンショット 2023-12-06 094703.pngスクリーンショット 2023-12-05 230635.pngスクリーンショット 2023-12-05 230659.png
Shelbey
Alteryx
Alteryx

Well, my solution to part 1 isn't pretty, and I realize that it could be a macro instead of the mess that I have, but hey, it works and my brain hurts so I'm going to leave it as is. 

 

As for part 2, let's just accept defeat and move on to Day 6...

Spoiler
Screenshot_challenge_AoC5.png
Labels