Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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

78 REPLIES 78
SeanAdams
17 - Castor
17 - Castor

I took a long way round - going to go back and have a look at some of the pure regex solutions like @clmc9601 

 

Spoiler
Part 1- just a simple regex to parse this out.     First regex finds the multiplier and the second breaks it into X and Y

Part 2 - I couldn't get this working in regex alone - so I did something different:
- add don't()do() at the beginning
- Split the string by don't() - this means that every string is excluded until you see a Do
- Then split by do()
- Discard the first split before the first do and the rest are useful strings (anything before the first Do is covered by a Don;t
- then apply part 1


image.png

And here is the python for today - quite a few fun list bits - I may go back and use an accumulator just for kicks.

image.png


as always - full solutions are here: SeanAdams10/AdventOfCodePython: Advent of code challenges in Python - across multiple years

Jeff_Neklason
8 - Asteroid
8 - Asteroid

Tool golf was fun after wrapping my head around it. Starting to get festive.

Spoiler
Day 3_1.jpg

Are we having fun yet?
Malvim
11 - Bolide

No RegEx no star...

 

Spoiler
Day3_2024.PNG

 Marcus Alvim

JoshuaB
Alteryx
Alteryx

Embarrassed I completely forgot to post my solution! 😫

 

Spoiler
2024-12-03_21-53-26.png
Joshua Burkhow | Chief Evangelist @ Alteryx | Follow me on LinkedIn and Twitter
JoshuaB
Alteryx
Alteryx

With that I just say..... Welcome to Advent of Code. Better get over it now because I assure you there are tons more where that came from! Great work overcoming the challenge! 

Joshua Burkhow | Chief Evangelist @ Alteryx | Follow me on LinkedIn and Twitter
cjaneczko
13 - Pulsar
Spoiler

image.png

Forgot to post day 1 and 2, but here is day 3

aiahwieder
9 - Comet

Oh, believe me, I know . . . I just haven't committed to grousing about it in a semi-public forum in previous years! 😉

BransonJamesFarley
8 - Asteroid

Also fun learning new capabilities with Regex!

 

Spoiler
Day 3.PNG

realdaniel1989
8 - Asteroid
Spoiler
AlteryxGui_ryYvICMahn.png
IgorL
6 - Meteoroid

Nice RegEx refresher to get in the groove

Spoiler
image.png
Labels
Top Solution Authors