Discussion thread for day 9 of the Advent of Code - https://adventofcode.com/2023/day/9
Another breath of fresh air. Very satisfying problem to solve. Reminded me of my high school days, solving for the degree of a polynomial sequence (That knowledge didn't help a ton, but those were happy memories for a weirdo like me)!
Why does this feel like the calm before the storm...
Today's problem was not as difficult as yesterday.
Today's one is easier than yesterday and can go out now!
Pretty happy with my simple-looking no macro solution. Naturally, there's a long formula hidden inside. I like to generate formulas like that in Excel so there's fewer opportunities for typos and so that I can make changes efficiently.
Overall, I'm pretty happy with this one. Part 2 took me longer than it should have, because I made a small change right after reading the problem that threw off the rest of my logic. It took me awhile to remember I'd done that and to fix it. Regardless, I was able to use the same exact macro for both part 1 and part 2, which I count as a win in AOC.
EDIT: Super intrigued by your approach @clmc9601 ! I can't dive into it right now because I'm on 2023.1 and missing one of the formulas you used, but I'm fascinated.
My solution. I've been recalling how to make the Iterative macro more and more.
Part 2 Reverse version macro(I only modified the final expressions. )
I don't have much chances to use Iterative macro in my daily business.
But this month I may use more cases than all I have used in the past
I remake the workflow. I organize my workflow by working only what I should do.
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
@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 😍
Just a lot of copy/paste. Part 1 was intuitive but part 2 was not for me.
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...
Fun and quick challenge today - gave time to catch up on day 5 :-)
There's a trick to this one too
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.
Took me longer than I like to admit.
seem like i built the shortest macro. but lot of dynamic rename involved.
AoC is finally helping me feel like I know what I'm doing with iterative macros 😊
Never have I ever made 3 iterative macros for a single challenge... until AoC Day 9 😭🤣
However, now that this one's behind me, this one was pretty satisfying!
I really enjoyed this one and Part 2 just involved changing the sort order of my data
Always good to practice the iteration macros. I finally learned from everyone else to setup the example first.
I post again with solution in yxzp.
Finally back on the wagon!
Loved the way that I could just reverse the values to make this work for my Star 2.Not the most efficient, but the job got done and me back in the game.I do need to refine my macro!!
Day 9 was fun
Easy to understand.