Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2024 Day 5 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

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

39 REPLIES 39
peter_gb
10 - Fireball

5 days in and still no macros used for me! 
I had a nice realisation about the logic which helped massively for part 2, not sure if it's a totally sustainable solution, as I feel like the iterative approach properly solves the problem, but my idea with the logic worked for my input...!

Spoiler
AoC_5.png

Samantha_Jayne
Alteryx
Alteryx

Very happy with my brain today in solving this one. Zero MACROS. This is the day where I feel like I can do Advent of Code. Best buy tissues for tomorrow.

 

Spoiler
Day 5 - Both Stars.png
Samantha Clifton
Alteryx
#alteryxrocks
Tokimatsu
12 - Quasar

2024 Day 5 is very hard to me.

Spoiler
スクリーンショット 2024-12-05 202552.png

mark-spain
9 - Comet

Another tricky one today. Feels like difficulty is starting to ramp up. 

Spoiler
AoC 2024 Day 5.png

 

Spoiler
AoC 2024 Day 5 - Macro.png

 

 

matthewblandford
8 - Asteroid

A few little tricks to this one, but not too bad!

 

Spoiler
The first part was pretty straightforward - used some parsing and re-concatenating to get the list of values that came after each page, and then checked to see if any broke the rules. After that, it was just grabbing the values of the median page number for each correctly ordered manual.

The second part was a little trickier, there were a few details in the rules that helped. Glancing over the rules showed that some rules contradicted each other or formed a closed loop, meaning it wasn't possible to create a master order for the 49 values. However, the fact that each value had the same number of rules as the others (and, specifically, half as many rules as there were other values - 24 rules, 48 other values) gave credence to the idea that each value in a manual's list would have a unique number of rules that could be applied to that manual - and that by counting how many rules could be applied to each value in the page list, you could come up with the new page order.Advent of Code '24 Day 5.png

 

(Since the connections were a little more tangled today compared to previous days, it was a good excuse to try the new connection color options in 2024.2!)

NicoleJohnson
ACE Emeritus
ACE Emeritus

Colored connection lines out in the wild! Looks great, @matthewblandford !! ❤️

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

My solution.

Spoiler
I guess Part 1 could be further simplified,
as I copied the logic to the Macro for Part 2. But it's time to go to bed...

Main workflow
workflow.png
Macro
macro.png
DataNath
17 - Castor
17 - Castor

Certainly no awards for creativity/tool golf today but we got there!

 

Spoiler
Day 5.png

Day 5 macro.png
Malvim
11 - Bolide

This was a fun one. I don't know why my mind force me to have a iterative inside a batch macro...

 

part 1 and 2 main workflow

 

Spoiler
Day5_2024_main.PNG

part 1 macro

 

Spoiler
Day5_2024_iterativeCheck_part1.PNG

 

part 2 macro

 

Spoiler
Day5_2024_reorder_part2.PNG

 

Marcus Alvim 

leozhang2work
10 - Fireball
Spoiler
Not perfect ordering bubble sort, a bit of random applied orderNot perfect ordering bubble sort, a bit of random applied orderday 5.png

Went too greedy at the first try, wanted to create the master ordered list, too many layers of macro.

Luckily cleared my ahead for a different direction, turns out much easier way.

Labels