ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
The Alteryx Community will be temporarily unavailable for a time due to scheduled maintenance on Thursday, April 22nd. Please plan accordingly.

General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

Advent of Code 2020 - BaseA Style (Day 2)

Jean-Balteryx
14 - Magnetar

Discussion thread for day 2 of the Advent of Code : https://adventofcode.com/2020/day/2

NicoleJohnson
14 - Magnetar
14 - Magnetar

... When those workflows start running and carols start humming, we sing of good CHEEEEERRRR!! 

It's the MOST wonderful TIIIIIIIIME of the YEARRRRRR.... 

 

Here's my solutions so far!! Goal this year is to make it to 25* = 8 more than last year. And am 100% going to play my West Coast time zone advantage to my benefit. #ruthless.

 

Day 1 Solution:

 

Spoiler
I ain't no quitter, so even though I solved this one pretty quickly with an Append strategy, I know from a few years on this AoC adventure that the efficient solution is the best solution in the long run, so I found a better way to do it in the end. 

My first attempt chose the "append all the numbers to all the numbers" route, which in the grand scheme of things only cost me about 0.2 extra seconds and gave me the thrilling "you have earned a gold star" message... BUT I HAVE LEARNED MY LESSON, Advent of Code. So I shaved ~0.2 seconds off my time by implementing a Formula at the beginning to determine eligible pairs, and then resorting to the Append method only for Part 2. Efficiency is King.

Day1.JPG

 Day 2 Solution: 

Spoiler
Ahhh, RegEx. What can you NOT do?

Filter formulas were the key here - and an excellent example of the power of Alteryx to do a lot of tricky things at once. With some strategic RegEx parsing, I was able to build quick formulas to determine not only those instances where the occurrences of letters were within the upper and lower bounds, but also to calculate the positions in which they occur for Part 2.

Day2.JPG

I find myself so incredibly eager for the next challenge... I know in about a week, this will no longer be the case (IntCode-from-2019, you are the thing of nightmares)... but the delusion of success is bound to endure for at least a few more days, so in the meantime, ONWARD!! 

 

Cheers,

NJ

https://github.com/AlteryxNJ/AdventOfCode_2020 

 

jdunkerley79
16 - Nebula
16 - Nebula

The early morning starts to do not help my brain - no difference between +1 and -1 it'll be fine...

 

Here's my day 2:

Spoiler
jdunkerley79_0-1606892060576.png

 

Posted to GitHub: https://github.com/jdunkerley/adventofcode

NicoleJohnson
14 - Magnetar
14 - Magnetar

@jdunkerley79  Methinks my late night brain definitely works the same as your early morning brain then, since I also added my 1's before I took them away.

Oops.

Jean-Balteryx
14 - Magnetar

Day 2 solution. Literally first thing in the morning !

 

Spoiler
Capture d’écran 2020-12-02 à 08.16.08.png
cgoodman3
12 - Quasar
12 - Quasar

Day 2

Spoiler
cgoodman3_0-1606895360796.png

 

So glad there's no sign of intcode this year....

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
joshuaburkhow
14 - Magnetar
14 - Magnetar

Day 2

Spoiler
joshuaburkhow_0-1606910841999.png

 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
danilang
17 - Castor
17 - Castor

I share your optimism @NicoleJohnson and and also your sense of dread remembering intcode from last year.  Alteryx makes a lot of things incredibly easy, but recursively modifying your inputs is not one of them.  

 

Spoiler
danilang_0-1606911474601.png

No messy SubString() functions for me(Yay), but more tools(boo)

Dan

davas
6 - Meteoroid

A bit clunky... will take a keen interest in the other solutions to see how i could have done this better! (But it gets the right answers 😎)

 

Spoiler
davas_0-1606911954119.png

 

aguisande
13 - Pulsar
13 - Pulsar

Hi all,

This is my Day 2.

Probably putting the formulas in the filters may be the way to go, but it works.

Spoiler
aguisande_0-1606918636770.png