ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2025 Day 12 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 12 of the Advent of Code - https://adventofcode.com/2025/day/12

14 REPLIES 14
mmontgomery
11 - Bolide
11 - Bolide

Day 12

Spoiler
I tried to build something fancy using spatial, and after an hour or so, I checked the community to see if I was on the right path - and nope! Turns out the problem structure makes it seem way harder than it is. Once I saw those hints, thanks @CoG and @gawa, I just did some simple math and got the right answer.Day12.jpg
AkimasaKajitani
17 - Castor
17 - Castor

I think that this is a narrative trick...or the best problem to fool AI.

 

Spoiler
AkimasaKajitani_0-1765552129789.png

 

Thank you to everyone who participated in this year's Advent of Code. The number of problems this year was a little disappointing, but it was still fun. I look forward to seeing you again next year! And Happy Christmas and new year!

 

Pilsner
13 - Pulsar

AOC 2025 COMPLETE! Saw some of the comments for this one saying "don't overcomplicate it". Spent about an hour dragging a couple of tools on, then deleting them again, before I decided to just try something simple to start. Turns out that was the answer, if only I'd listened to the comments 😂

 

Overall, a great end to a very enjoyable AoC, I've learnt so much from others' solutions, so thank you all, and a big congratulations to all participants! Final shameless shoutout to Euleryx for anyone looking to continue the nerdy chatter and "mathsy" problem-solving into the new year.

 

Happy Christmas 🎄

 

Spoiler
I am a couple of days behind in my uploads, so I will be getting the remaining published shortly, but in the meantime, here is my workflow for day 12.

Workflow:
Pilsner_10-1765553653455.png

 


Part 1

1) To begin with, I created a group ID. This was based on line breaks, so every time there was a line break, the group ID increased by 1. This helped to label the 6 presents 0-5, and also mark the grid inputs as group 6. I proceeded to filter the group 6 items out, so I could deal with them separately. 

 

Pilsner_2-1765552801413.png


2) Looking at just the grids, I then decided I need to separate the present counts from the grid dimensions.

Pilsner_3-1765552916465.png

 

3) With the dimensions isolated, I now needed to list the counts of each present per line, so I could actually do something with them. The important thing here is to then ID these lines, so that I can later join them up to their corresponding present. 

Pilsner_4-1765552984519.png

 

4) Now, going back to step one, on the false anchor of the filter, I have all my puzzles. All I wanted to do, was count the number of spaces they each occupy. I did this by counting the number of # per line:
Pilsner_5-1765553197240.png

 


Then summing that count, per present (group) ID:

Pilsner_6-1765553228772.png

 


5) Now to join these counts to the corresponding present ID from step 4.
Pilsner_7-1765553301745.png


6) With both the number of presents needed per grid, and the count of spaces each present occupied now side by side, I was able to multiply these two values together to get the total number of spaces occupied per grid per present ID. Summing these values per grid then gave me the total spaces occupied per grid. 

Pilsner_8-1765553478063.png

 


7) But, does each grid contain enough space to satisfy, the requirement? This is effectively he final check. I used regex to help me extract and then multiply the grid dimensions before filtering to make sure the total grid area was greater then the spaces required.
 Pilsner_9-1765553612473.png

 



Stosh
7 - Meteor

Day 12 definitely left me with a smile on my face, for sure😅 And with that, the Alteryx Base-A AOC Challenge is complete!

 

My Solutions:

Spoiler
Part 1 (and Part 2😉) solution
Stosh_0-1765575691340.png

 My Reflection:

Spoiler
In terms of problem description, this was easily the most intimidating puzzle in the challenge. I promised myself I wouldn't stay up all night in order to solve it, but I was awake at midnight so I decided to just read the problem and WOW! I almost couldn't fall asleep for a bit there out of sheer confusion and nervousness for how I would solve this. I went to bed with questions and woke up with more, but I knew the best thing was to just start it up and see what happens. After all, I came way too far to give up now! I decided to just try to identify as many 'obvious' cases as possible from the pool of tests before being forced to come up with some way to rotate shapes🤣. I identified two ways to identify if a test could be immediately considered pass or fail: If the sum of the sizes of all the required gifts exceeds the size of the grid, the test is a guaranteed fail, as no rotations or alignment can make up for a lack of space. Conversely, since all gifts are 3x3 in square dimension, if a grid has enough 3x3 sub-grids to house the full count of required gifts, then it is an automatic pass, as rotating and stacking gifts is no longer relevant or required. As I was configuring these tests, I was hoping and praying that these tests would thin down the list considerably and then it happened: The Christmas miracle! As it turns out, all 1000 cases fall into one of these two categories, and the problem is solved! This was a cool case of handling your upper and lower bounds before being bogged down with the intricate cases, and I am so glad that I approached it exactly how I did. 

Overall, my first Alteryx AOC has been an incredible experience. I learned so many cool Alteryx concepts, was introduced to new to new tools, and met so many cool people! I want to give a shout out to @OllieClarke for introducing me to this challenge and to all the other folks in the group-chat, whose help was utterly indispensable in each and every challenge. By next December, I hope to have a lot more stars under my belt from previous AOC challenges and will be shooting for the leaderboards. Looking forward to seeing you guys in the Weekly Challenge discussions!
AncientPandaman
13 - Pulsar

done. 

Spoiler
PangHC_1-1765770410585.pngPangHC_0-1765770397675.png

 

Labels
Top Solution Authors