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.
alteryx Community

# 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)

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.

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.

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

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

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.

14 - Magnetar

Day 2 solution. Literally first thing in the morning !

Spoiler
12 - Quasar

Day 2

Spoiler

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

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

Day 2

Spoiler

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
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

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

Dan

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

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