Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2023 Day 9 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 9 of the Advent of Code - https://adventofcode.com/2023/day/9

28 REPLIES 28
FrederikE
13 - Pulsar

Today a workflow that finishes within seconds - how nice. 

 

Spoiler
Screenshot 2023-12-09 192021.png
Screenshot 2023-12-09 191814.png

 

Carolyn
12 - Quasar
12 - Quasar

Got it! I screwed up on my initial RegEx and dropped the negative signs. I ended up rebuilding the workflow 3 times and the macro twice (thanks @phottovy (again) for posting your workflow - it helped affirm I was doing the dang workflow right), getting the same wrong answer every time (which was frustrating at the time, but now makes me feel better) before finally catching the RegEx error. I'm going to sit and stare at a wall for awhile :) 

 

Spoiler
2023-12-09_11-13-42.png

  

2023-12-09_11-13-55.png

 

Carolyn
12 - Quasar
12 - Quasar

@clmc9601 - I wanted to do something like this but couldn't figure out how! I could see it in my brain but had no idea how to make it happen. It's so beautiful 😍

patrick_digan
17 - Castor
17 - Castor

Just a lot of copy/paste. Part 1 was intuitive but part 2 was not for me.

Spoiler
image.png
Qiu
21 - Polaris
21 - Polaris

I spent much time on part1 then realize the criteria I set for all the numbers become zero is incorrect.

I used Sum and there are cases like -1, -0 and 1, then the macro will stop to continue and gave me wrong result...

Spoiler
AOC2023-Day09-A.pngAOC2023-Day09-B.pngAOC2023-Day09-C.png

 

SeanAdams
17 - Castor
17 - Castor

Fun and quick challenge today - gave time to catch up on day 5 :-)

There's a trick to this one too

 

Spoiler
The trick here is that you don't need to keep all the data - the pyramid can be as wide as you like, it doesn't matter
You just need to keep (for every row other than the top row) the first and the last values - and that gives you part 1 and part 2

The iterative macro below goes across the first row - and you can go downwards to the bottom of the pyramid with a multi-row

Screenshot 2023-12-09 212957.png
DataNath
17 - Castor
17 - Castor

Day 9 completed! Definitely not as succinct as it could've been but just enjoying getting to the answers - another fun challenge and both parts run together in 1.6s.

 

Spoiler
Day9WF.png

Day9.1Iterative.png

Day9.2Iterative.png
SuguruYoshinaga
9 - Comet
Spoiler
WF
 

image.png

macro
 

image.png

leonhekkert
8 - Asteroid

Took me longer than I like to admit.

 

Spoiler
Day9.pngDay9 Batch.pngDay9 Iterative.png
PangHC
12 - Quasar

seem like i built the shortest macro. but lot of dynamic rename involved.

Spoiler
part1: forget the "-" was in the number
part2: try to use sum method as part1 not working. changed as instruction show.

workflow
Screenshot 2023-12-12 095218.png
macro
Screenshot 2023-12-12 095227.png

 

Labels
Top Solution Authors