Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2024 Day 1 (BaseA Style)

MeganBowers
Alteryx Community Team
Alteryx Community Team

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

74 REPLIES 74
rbgruwel
8 - Asteroid

Nice challenge to start with

mark-spain
8 - Asteroid

A nice start to advent of code 2024 - I'm sure there is much madness yet to come :D

Solved with "help" from my 5yo son this morning, who really wants me to help the elves save Christmas!

My solution attached:

Spoiler
AoC 2024 Day 1.png

I've defined List 1 and List 2 using the Formula tool:
List 1 = ToNumber(Regex_replace([data], "(\d+) +(\d+)", "$1"))
List 2 = ToNumber(Regex_replace([data], "(\d+) +(\d+)", "$2"))

Here the \d characters represent any numeric character, and I'm asking for 1 or more of that pattern. I use two capture groups, by encasing the numeric character patterns in round brackets. The " +" pattern represents 1 or more spaces, and since this is not in a capture group then this part of the string is ignored. The Regex_Replace function allows you to reference the capture groups by number using the "$" notation. 

DavidP
17 - Castor
17 - Castor

Not the prettiest, but I'm on the board!

 

Spoiler
aoc 2024 d1.png
AsmiDesai
9 - Comet

AOC Day 1 workflow.

Qiu
21 - Polaris
21 - Polaris

Day 1 is not so harsh to me.

Spoiler
AOC2023-Day01.png
PangHC
12 - Quasar

in "text to column" set config as "Drop extra column with warning" and "skip emtpy column" will trim the extra space. while default is not.
Screenshot 2024-12-02 104712.png

Spoiler
Screenshot 2024-12-02 104732.png
stataltgee
8 - Asteroid

DAY 1 LETSS GOOOOO🚀

Tokimatsu
12 - Quasar

Solved.

Spoiler
スクリーンショット 2024-12-02 154942.png

hiroshi-wakasugi
8 - Asteroid

I tried it.

danboll_life
8 - Asteroid

first challenge

Spoiler
AoC_2024_01.png

Labels