ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
1 Day Left! - The Alteryx Community will be temporarily unavailable for a few hours due to implementation of the new SSO experience starting tomorrow at 5pm MDT. Please plan accordingly. For more information, read the blog.
alteryx Community

# General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

## Advent of Code 2020 - BaseA Style (Day 11)

12 - Quasar

Definitely needed a couple hints to get going on this one. It finally clicked when read people were using coordinate based approaches. And as I write this I am realizing I probably could have made use of spatial tools for distance calculations. Oh well... nothing wrong with brushing up on grade school math.

Spoiler
Workflow

Macro

7 - Meteor

@Greg_Murray This one was interesting - you can cheat and use 1 dimensional distance.  I just #'ed the cells 0 to 9024 and then used abs(a-b) for distance.  The absolute distance doesn't matter, only the sort order.

12 - Quasar

Here's my solution for the first part. Like @Balders there are a lot of tools in the macro to force it to exit when it meets the condition of no seats changing between the iterations.

Spoiler

Macro:

It's late and it's Friday so I'll try and workout part 2 over the weekend.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
8 - Asteroid

Tried to edit my post yesterday but it disappeared..

Here's my iterative solution.

Spoiler

iterative to solve 1

iterative to prepare for part 2

iterative to solve part 2

8 - Asteroid

It was really interesting to see the seating iterations develop too!

Spoiler

https://public.tableau.com/profile/petergb#!/vizhome/Day11_16077110205010/AoCDay11

8 - Asteroid

Watching the seats fill up is very satisfying!

Spoiler

15 - Aurora

So while my original idea of converting to spatial and using find nearest, like many of us did last year, showed promise but was WAY too slow.

Solution to part 1 is probably very convoluted, but it works, and it only takes about 30 seconds for the iterative macro. Not stellar time, not winning at tool golf, but at least it functions.

Part 1 workflow, simple enough

Spoiler

Macro. Ugh. But it works

Spoiler

13 - Pulsar

A week between parts a & b for me as my son came home and busy with work before off for 2 weeks (but not from Alteryx 😃).  Could have used the second macro for both with minor changes to workflow.

Spoiler

Workflow
11a Iterative Macro
11b Iterative Macro