Discussion thread for day 21 of the Advent of Code - https://adventofcode.com/2023/day/21
Today not purely solved by Alteryx but also hand-writing on paper and calculator.
Brute Force will not work. If you find something, it would turn to be a math problem, still complicated though.
I explain my way as nested spoiler here. More hints you want, more spoiler you can collapse.
Categorized in three pattern: odd diamond, even diamond, other diamond.
By knowing the count of each diamond, and how many number of diamond exist, you can multiply them, and sum up. That is your answer.
@gawa OMG, how did you figure that out.... 🤔
Part 1 was very easy, Part 2 was full of pitfalls for me, I was able to quickly establish what needed to be done, but doing that was a different story. As @gawa - mentioned, there is no way to simply solve Part 2, you will need to analyze the underlying data for patterns that can simplify the problem. Pen, paper, and lot of test runs on random workflows revealed that structure to me and got me the answer I needed.
Algorithm:
Workflow:
Happy Solving!
refer lot of codes. and built workflow based on answer.
create lot of excel files for helper, and it really helpful
To be the honest, I don't like the quiz to find the pattern to solve part 2. This year, there are many such that quiz.
I was happy when I found the pattern for Part 2, but it was a long process until I got it right.
After taking a couple week break, I FINALLY solved Part 2. I forgot how good the "you earned a star" message feels! That was gnarly.