Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2024 Day 3 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 3 of the Advent of Code - https://adventofcode.com/2024/day/3

73 RESPOSTAS 73
clmc9601
13 - Pulsar
13 - Pulsar

Such a relief when regex works the way I intended on the first try 😅

 

Saqueador
Tokenize for the win! I'm very surprised there weren't any parsing tricks... that would have been very on brand for AoC.

 
2024-12-02_23-13-44.PNG

kelsey_kincaid
12 - Quasar
12 - Quasar

Refreshing on RegEx ahead of Advent of Code has already paid off this year!

 

Saqueador
2024_Day3_KelseyKincaid.png2024_Day3_RegEx_KelseyKincaid.png
CoG
Magnetar

I had some trouble with my code, initially, but managed to identify and resolve the bugs I ran into quickly

 

Saqueador
Main.png

 

gawa
16 - Nebula
16 - Nebula

It's about 'Parse'.

Saqueador
When complicated parse is needed, Regex tool will do it perfectly.
Part1: We need to parse out all pattern mul({inetger},{integer}), but not knowing how many exist.  In this case, we can use 'Tokenize' into rows.
Please be careful when regex expression includes meta characters, they must be escaped by backslash '\'.
image.png
Then, data can be further parsed into columns to extract 2 integer values.

Part2: We need to extract more patterns 'do()' and 'don't()' in addition to 'mul({integer},{integer})'. Regex can be modified to match any of those patterns by vertical bar like (pattern1|pattern2|....|pattern N)
Then, by using Multi Row Formula, we can identify which record is to be calculated.
image.png

(Edit)

Tool golf version: Part1=3 tools, Part2=3 tools

Saqueador
Formula tool is very powerful!
image.png
clmc9601
13 - Pulsar
13 - Pulsar

I love seeing the cryptic and quickly typed column names and annotations AoCers use when racing on the leaderboard. 😂 not maintainable, but so relatable and funny

AkimasaKajitani
17 - Castor
17 - Castor

Solved!

 

I should become closer friends with the RegEx tool.

Saqueador
 

image.png

But to simplify the regex, I used the Find Replace tool.

ScottLewis
Bólide

The RegEx on this one was beyond my normal reach, but we got there. 

 

One useful trick was 

Saqueador
Replacing do() and don't() with single characters so you can use Parse on delimiter. 
PangHC
Quasar

regex tools win the race today. 

Saqueador
Screenshot 2024-12-03 135445.png
geoff_zath
Alteryx
Alteryx
Saqueador
AoC_2024_day3.png

Rótulos
Autores com maior número de soluções