We’ve extended Inspire Early Bird Pricing until March 1. Register now and enjoy 20% off conference passes and 10% off training passes. P.S. Don’t forget to bring friends! When you sign up for five or more tickets, you get an extra 20% discount on conference passes. Learn more now.
alteryx Community

# General Discussions

Discuss any topics that are not product-specific here.

## Advent of Code 2023 Day 1 (BaseA Style)

Alteryx Community Team

78 REPLIES 78
13 - Pulsar

The hardest is on day one right?!?

Spoiler
Reverse strings for the win. My solution only works with the first and last but wouldn't work if you had to identify every number.

17 - Castor

2 stars down, 48 to go!

Spoiler
Similar to others my first go at part 2 was incorrect. I looked at his sample with eightwo, and I decided that I would match his sample answer if I replace the numbers but also keep the first and last character (ie two = t2o, eight = e8t). so eightwo becomes eight2o and then replaces the eight to get e8t2o
14 - Magnetar

My solution, did not enjoy the regex I had to build but yes!

Alteryx
Spoiler
Used the Data Cleansing tool instead of regex to strip out all of the text - but hardcoded part 2

7 - Meteor

Part 2 threw me for a loop! Ended up just inputting the possible overlappings in my lookup values, since there weren't that many possible combinations. Excited for tomorrow!

Spoiler
15 - Aurora

Was not expecting the misfits on day 1

And when I started to think of the myriad of combos of digits, I didn't want to go brute force with a find replace.

So, I went brute force with 9 formulae.

Won't be doing the midnight drop tonight because Shabbat. So a little catch up right off the bat.

Spoiler
First attempt I put the digit at the beginning of the word. That caught more of the misfits, but not all.

So then I tried putting it in the middle. Bingo!

IIF(Contains([Field1], "one"),REPLACE([Field1],"one","o1ne"),[field1]). Rinse and repeat for all the digits.

15 - Aurora

Loving the use of regex in this one!! Seems my brain doesn't regex at midnight....

16 - Nebula
Spoiler
already going with the brute force method with part 2 with the lookup table
13 - Pulsar

It's finally that time of the year to be stressed out by daily challenges again 😅

Spoiler

17 - Castor

My 1st workflow was very redundant. So I remade it with a cool head.

Spoiler

And I tried to make it using Designer Cloud.

Spoiler

I can't reproduction my workflow in Designer Cloud because there is no first and last option at Summarize tool. So I adopted the @NicoleJ 's Idea(Data Creansing tool)

Labels