Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

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
Blake_E
8 - Asteroid

Was really overthinking the resort in part 2 and then think I stumbled into some dumb luck while exploring the data.

 

Spoiler
 

Day5 workflow.png

 

afv2688
16 - Nebula
16 - Nebula

First iterative one

 

Spoiler
Untitled.png
SeanAdams
17 - Castor
17 - Castor

a sorta-brute-force solution - almost like a sorting algorithm

 

 

Spoiler
Part 1:
- Split the string at each point - breaking it into a left; current and right
- join this to the rules table (which is a before and after value)
- if the offensive value appears in the left part, then this particular combination fails
- Roll this up by report ID

Part 2:
in a loop:
- swap the before and after values that broke a rule
- check using the part 1 macro
- process the ones that are still failing


Main Canvas:

image.png

Checker:

 

image.png

 

Iterative Fixer:

 

image.png

 

 

Python code for Day 5:

image.png

image.png

 

 

 

 

 

 

 

All code at SeanAdams10/AdventOfCodePython: Advent of code challenges in Python - across multiple years

estherb47
15 - Aurora
15 - Aurora

Part 1 was easy for me to understand. Part 2 not so much, but got through

 

Spoiler
This one is all about pattern recognition. Part one solved by matches and simple math. If the total number of matching rules equals the total number of combinations of numbers, then it's a match.

Part 2, we only look at the manuals that fail the first test. Then count the number of commas in each manual and divide by two. If the number of rules that apply to each manual equals half the number of commas, that's the number that will be in the middle.

Nothing unique to mine after looking at other solutions

image.png
Qiu
21 - Polaris
21 - Polaris

Late post.

Spoiler
AOC2024-Day05.png
BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

Awesome. Little bit of thought needed for part 2 for the tactic. 

Spoiler
Screenshot 2024-12-09 223459.png

 

All the best,
BS

LinkedIN

Bulien
aiahwieder
8 - Asteroid

Still stuck on 1 star . . . might come back for it later (HA HA)

Kenda
16 - Nebula
16 - Nebula
Spoiler
image.png
mkeiffer
10 - Fireball
10 - Fireball

My AoC Day 5 solution!

Spoiler
Screenshot 2024-12-26 at 1.47.42 PM.png

 

Screenshot 2024-12-26 at 1.47.58 PM.png

 

CailinS
Alteryx
Alteryx

another fun one - a real brain twister, even for part one. which is all I got to this time around.

 

 

Spoiler
Day 5 Part 1.jpg

 

Cailin Swingle
Customer Experience
Labels