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

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2020 - BaseA Style (Day 14)

Jean-Balteryx
16 - Nebula
16 - Nebula

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

13 REPLIES 13
jdunkerley79
ACE Emeritus
ACE Emeritus

Feel like I over complicated part 2 but it works...

Spoiler
jdunkerley79_0-1607942120746.png


Lots more binary

 

Balders
11 - Bolide

Here's me, a nice step down from yesterday's part 2 😅

 

 

Spoiler
In part one I used a really long repetitive formula to avoid the tokenisation stuff you see if part two.

AoC 14.png
Balders
11 - Bolide

Has anyone got a good way of doing "find nth" in a formula. I think part 2 could be simplified if there's an easy string manipulation way of doing "find nth" to search through Xs. 

jdunkerley79
ACE Emeritus
ACE Emeritus

@Balders yep - did some dynamic regex to get a new version working. Less tools but slower than old version.

 

Spoiler
jdunkerley79_0-1607947810977.png

REGEX_Replace(
iif([Row-1:memory]="",[memory],[Row-1:memory]),
"^(.{" + ToString(Length(
REGEX_Replace(Mask,"(^([^X]*X){" + ToString(i) + "}[^X]*)X.*","$1")
)) + "})."
,"${1}" + Substring(PadLeft(IntToBin([P]),Count,"0"),I,1))

And used Regex CountMatches to work out how many I needed to run

 

Balders
11 - Bolide

@jdunkerley79 excellent

dsmdavid
11 - Bolide

Not aiming for any golf points today...

Spoiler
Alteryx_Day_14.png

the first part builds the regex for the replacements.
Part II - went iterative as I couldn't figure out how to replace all the potential 'X's.

 

 

https://github.com/dsmdavid/AdventCode2020

AkimasaKajitani
17 - Castor
17 - Castor

Day14!

 

There are a lot of tools, but it's working well.

Spoiler

Workflow:
AkimasaKajitani_3-1607961466832.png

 



Outer Iterative Macro: Iterative is only 36 times.
AkimasaKajitani_2-1607961439421.png

 


Inner Batch Macro: overwrite the Field Name for splitting 0,1 
AkimasaKajitani_1-1607961392053.png

 

 

I have still yesterday's homework...(I don't clear the Day13 Part 2 by only Alteryx)

Greg_Murray
12 - Quasar

I struggled through part 2, but eventually got there. I think I can chalk it up to not reading the prompt thoroughly. 

Spoiler
Greg_Murray_0-1607962534339.png

 


 

danilang
19 - Altair
19 - Altair

Parts 1 and 2.  

 

Spoiler
w.png
I thought I'd have to use a macro to generate the combinations for part 2, but I was able to figure it out using multiple applications of BinaryAnd in the big formula 

Dan

Labels
Top Solution Authors