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 4 (BaseA Style)

AlteryxMatt
Moderator
Moderator

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

Matt Rotundo
Alteryx Community Moderator
43 REPLIES 43
EKasminsky
9 - Comet
Spoiler
EKasminsky_0-1765386844349.png

 

I got part one figured out. I initially saw that map and thought I couldn't ever figure it out but I did!

Part 2 maybe later if I have time and learn macros better?

mceleavey
17 - Castor
17 - Castor

Trying to remember what I did when posting these days later. I'm old.

 

Spoiler
mceleavey_0-1765446352071.png

The first section is simply creating a row ID then Tokenising to rows on all characters, then giving a column ID and removing the non-"@" characters.

Part One - Straightforward. I simply created the associated Row/Column reference for every cell (3 above, 2 on the same row, 3 below) and joined these associated cells back to the cell in the main stream. The join removes any cells that are not valid (either don't exist or are not @ cells).
I then simply counted the associated cells and created a formula: if [Count]<4 then 1 else 0 endif. This was then summed to give the answer.

Part Two: More complicated and I definitely overthought this. 

mceleavey_1-1765446752229.png

The first part of the Iterative macro did almost the same as part one but would remove the rolls from the first run, then iterate around to the next run with those rolls removed. It would then determine the number of changes and the number of changes that run. Once the number of changes that run had dropped to zero the running total of number of changes was output.


 M.



Bulien

BobbyHan
5 - Atom

I'm quite new to the world of remote work, but recently I discovered madcash.pro while browsing for reliable info about online earnings. The content feels real, not just promises or hype. There are guides for total beginners, and that’s exactly what I needed. Maybe you’ll find something helpful there as well.

nikolinamilincevic
7 - Meteor

Now that I got familiar with interative macro, nothing can stop me from using it :D 

I used an iterative macro for part 1, and then another one for part 2 where I reused the one from part 1. 

 

Spoiler
workflowworkflowworkflow
Spoiler
macro for Part 1macro for Part 1 - counts rolls that could be approached at oncemacro for Part 1 - counts rolls that could be approached at once
Spoiler
macro for Part 2macro for Part 2 - counts the total number of rolls that could be removedmacro for Part 2 - counts the total number of rolls that could be removed
Labels
Top Solution Authors