Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2023 Day 2 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Révélation
 

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

65 RÉPONSES 65
patrick_digan
17 - Castor
17 - Castor

Very similar to others

Révélation
image.png
gawa
15 - Aurora
15 - Aurora

Tool golf version. 9 tools excluding input tool.

Révélation
image.png
mceleavey
17 - Castor
17 - Castor

Easier than day 1 and I'm still in it...

Révélation
Screenshot 2023-12-02 115329.png
A straightforward parsing process to begin with. I used text to columns to isolate the Game ID, then split to rows on the game phase. I then used a multi-row to assign a phase number, then I used text to columns and regex to strip out the bits I needed. 
For part one, it was then a matter of cross-tabbing into an aggregate set by Game and phase, then stripping out the actual numeric value of the game. I then used a filter to isolate those that did not violate the limits, then used the join to join those game numbers that had a violation, so I took the ones on the left output, those being the ones that did not exceed the limits, then simply summed the game numbers.
Part two was a simple grouping, then applying the multi-row power calculation (grouped by game ID), then taking the max of those and summing the total.

Go #TeamMcEleavey!



Bulien

SeanAdams
17 - Castor
17 - Castor

I was looking for the sneaky trick in part 2 but was pleasantly surprised that there was none.

Today was a good day to get things like setting up a GIT repo; making a donation to AOC to get that ++ tag etc.

 

Révélation

2023-12-02_07-49-11.png



This solution is 2 parts:
- the parser (the brush icon) cleans up the data to the shape we need it to start doing the job
- then we can start doing the calc
- and on the end you'll see the test harness that keeps me honest as I try different things.

Here's the parser - super rudimentary:
Screenshot 2023-12-02 075116.png



SeanAdams
17 - Castor
17 - Castor

thank you for continuing to point out where we can experiment with new features @NicoleJ  - it really does help to highlight these new capabilities and give folk muscle-memory to try them.

 

I'm sure you're looking out for opportunities for the Control Containers to shine!

SeanAdams
17 - Castor
17 - Castor

good on you for dual-solving in Designer Cloud @AkimasaKajitani !

rachel_k
Alteryx
Alteryx

Similar approach to others.  After yesterday, I felt like I had to check for any unexpected colors

Révélation
day2.png
mmontgomery
Bolide

W00t on the problem being very procedural!

Révélation
Day2.png
Samantha_Jayne
Alteryx
Alteryx
Révélation
Day 2.png

Oh my goodness part 1 was a bit of a head twister with everything you have to check. Loved that part two was an easier one to solve. Will have a go at removing all the unnecessary tools I used later. Busy day. But glad I solved another day. Whoop.

Samantha Clifton
Alteryx
#alteryxrocks
AkimasaKajitani
17 - Castor
17 - Castor

Thanks! @SeanAdams  I think that we can solve the AoC with Designer Cloud until we need the Generate Row or Multi-Row Formula tool.

Étiquettes