Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2020 - BaseA Style (Day 2)

Jean-Balteryx
16 - Nebula
16 - Nebula

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

17 REPLIES 17
NicoleJohnson
ACE Emeritus
ACE Emeritus

... 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
ACE Emeritus
ACE Emeritus

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
ACE Emeritus
ACE Emeritus

@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
16 - Nebula
16 - Nebula

Day 2 solution. Literally first thing in the morning !

 

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

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
ACE Emeritus
ACE Emeritus

Day 2

Spoiler
joshuaburkhow_0-1606910841999.png

 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
danilang
19 - Altair
19 - Altair

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
7 - Meteor

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
15 - Aurora
15 - Aurora

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

 

 

Labels