General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2022 Day 8 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Discussion thread for day 8 of the Advent of Code - https://adventofcode.com/2022/day/8
21 REPLIES 21
peter_gb
9 - Comet

I have a habit of using A LOT of tools it would appear but I really like seeing each step of the way and being certain the logic is working the way I'm visualising the problem in my head. Need to dig into some other solutions to see how they've possibly been done more efficiently than my works of art 🤣 🎅

Spoiler
AoC_8.png

A closer look :

Spoiler
AoC_8_2.png

mmontgomery
11 - Bolide

Focused on creating categories for each point (left, right, up, down) with help of generate rows. For P1, I created a boundary with values of -1 to count those. For P2, took me a while, but had to bucket each category. Got values greater than no problem, just had to do running total and first record on current point then union.

 

Spoiler
mmontgomery_0-1670511320220.pngmmontgomery_1-1670511335907.png

 

 

Jean-Balteryx
16 - Nebula
16 - Nebula

Tool golf version : 9 tools !

 

Spoiler
JeanBalteryx_0-1670511541873.png

 

JamesCharnley
13 - Pulsar
Spoiler
Part 1 Macro:
JamesCharnley_0-1670510629287.png


Part 2 Macro:

JamesCharnley_1-1670510648280.png

Workflow:

JamesCharnley_2-1670510682840.png

 

Another day, another unnecessary and hideous macro. I'm having fun nobody can stop me

OllieClarke
15 - Aurora
15 - Aurora

That felt inelegant

Spoiler
OllieClarke_0-1670517477433.pngOllieClarke_1-1670517509488.png

 

DataNath
17 - Castor

Finally got today's done! Spent 2.5 hours trying to debug my macros only to realise I was leaving my RecordID field in my 'left' count...

 

Spoiler
DataNath_0-1670521532570.png


Column movement checker:

DataNath_1-1670521582758.png


Row movement checker:

DataNath_2-1670521621375.png
JarekSkudrzyk
11 - Bolide

I am totally proud of myself for solving today's challenge:)

 

Spoiler
JarekSkudrzyk_0-1670534697592.png

 

LiuZhang
9 - Comet
Spoiler
WorkflowWorkflowGot into a rabbit hole of doing iterative, should have done a batchGot into a rabbit hole of doing iterative, should have done a batchSo bad, I don't event want to annotate it, brute forcedSo bad, I don't event want to annotate it, brute forced

Scraping by now, just want the answer, not care about the efficiency anymore 😅

Pang_Hee_Choy
12 - Quasar
Spoiler
part 1:

1. split to x,y coordination. create for list x and y.
2. use left for top, left. and right for down, right
3. use regex_countmatches to count more than 1
4. merge with edge and count record.

Pang_Hee_Choy_0-1670563861830.png

part2:
1. get the list. 
2. remove unnecessary item, descending and compare
3. sum the count and get result.

Pang_Hee_Choy_1-1670564209557.png

 

SeanAdams
17 - Castor
17 - Castor

Super messy solution - well at least the weekend is ahead, and time for refactoring ...

 

 

Spoiler
The starting point is the data prep:

SeanAdams_0-1670640282371.png


Teh data prep separates this in to row-wise and column-wise trees.
The second phase then does a simple check and counts

SeanAdams_1-1670640340544.png



This is the macro in the middle the processes ever subset of the strings:

SeanAdams_2-1670640423655.png




Part 2 is just a slightly different sum on the same data

SeanAdams_3-1670640448089.png



Labels