Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2023 Day 1 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 1 of the Advent of Code - https://adventofcode.com/2023/day/1

81 REPLIES 81
chandler-gjino
Alteryx
Alteryx

attaching my solution for day one

phottovy
13 - Pulsar
13 - Pulsar

@starkey, adding containers was a nice touch to hide that we secretly worked together! 

MeganBowers
Alteryx Community Team
Alteryx Community Team
Spoiler
I am impressed with some of the regex solutions for part 2 on here. I hardcoded mine for part 2, but it took a while to find all the exceptions!

Screen Shot 2023-12-01 at 9.17.01 AM.png
SeanAdams
17 - Castor
17 - Castor

Great start to AOC - I feel like I cheated a bit, but going to have a look at how other people did it.

 

 

Spoiler

Recipe here is a bit of a cheat:
- Take each number (written in text and in numbers) in a text input.    screenshot 1
Screenshot 2023-12-01 113216.png
- do a cross-join with the test data so that every data row joins to every number
- then check for the first instance of the number ("one") in the text
- then reverse the test data and the numbers and look for the first instance of the number ("eno" - reversed "one")
- now you have the last and the first instance of numbers in the string

Why this way?
- it avoids the issue of numbers that share letters like "oneight"
- given you only want the first and last - you don't need to worry about every instance
- Finding the first instance is easy in Alteryx, finding the last is a little tougher, so reverse the strings and then it all becomes "find the first"

Screenshot 2023-12-01 113632.png




 

 



 

 

The_Rad_Valentina
8 - Asteroid
8 - Asteroid

The second part was indeed confusing, but we got her solved. 

The_Rad_Valentina
8 - Asteroid
8 - Asteroid

Second part was indeed confusing but we got it done.

Carolyn
12 - Quasar
12 - Quasar

Complete! I borrowed @Tokimatsu's RegEx Replace after my RegEx Replace formulas missed the stupid Part 2 trick

 

The ReverseString idea from others was genius!

 

Spoiler
2023-12-01_09-32-59.png
geoff_zath
Alteryx
Alteryx

That was a fun one!

Spoiler
day1_AoC_GKZ.png

mbarone
16 - Nebula
16 - Nebula

My first every AOC attempt "for real" (did one last week to go over in a UG).  Didn't get to it until this afternoon, but **bleep**, that second part was a pain! Tried several things but they were hardcoded and I hated that, so I finally came up with a dynamic way using append.  Fun fun!

Spoiler
2023-12-01 16_07_31-Alteryx Designer x64 - Day01.yxmd.png
StevenP
8 - Asteroid

Managed to complete part two with a little rework on my matching list

Spoiler
image.png

 

Labels
Top Solution Authors