General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2021 Day 4 (BaseA Style)

jdunkerley79
ACE Emeritus
ACE Emeritus

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

25 REPLIES 25
estherb47
15 - Aurora
15 - Aurora

Thanks, @joshbennett ! I love how we learn from each other in this space

OllieClarke
15 - Aurora
15 - Aurora

Catching up on the weekend 😬

Spoiler
WorkflowWorkflowFirst PartFirst PartSecond PartSecond Part
SeanAdams
17 - Castor
17 - Castor

This was a fun one - these challenges where you have to look for patterns on a board intrigue me.

 

Spoiler
First part is fairly simple - data import and shaping:

SeanAdams_0-1639188871852.png

Then call the built-in Alteryx Bingo Macro and either find the last or the first board.

SeanAdams_1-1639189384356.png

 

The Bingo Macro is relatively simple - it passes the board through multiple times, marking the cells as done by using YXDB file - then use the list of bingo balls as the iterator
SeanAdams_3-1639189528374.png

 


Then the final piece is the scoring macro - super easy:

SeanAdams_4-1639189570971.png

 

SeanAdams
17 - Castor
17 - Castor

This is an elegant solution @AkimasaKajitani - thank you, it gave me something to learn.

glenperes
8 - Asteroid
Spoiler
Managed to do it without an iterative macro
4.1.JPG

caitlynmcintyre
9 - Comet

This one was tough for me because I really confused myself with a stupid mistake, but got there in the end.

 

 

Spoiler
My problem was my part 2 macro was telling me which card would win last, not when it would win. I just pushed that card number into my Part 1 macro to get the answer instead of fixing my mistake 🙈
caitlynmcintyre_0-1639626234666.png

Macro to show first card/which number will give bingo 

caitlynmcintyre_1-1639626265262.png

 

Macro that gives last card left
caitlynmcintyre_2-1639626296893.png

 

Labels