Discussion thread for day 12 of the Advent of Code - https://adventofcode.com/2025/day/12
Day 12
I think that this is a narrative trick...or the best problem to fool AI.
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!
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 🎄
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.
2) Looking at just the grids, I then decided I need to separate the present counts from the grid dimensions.
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.
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:
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.
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:
My Reflection:
done.
