Advent of Code 2023 Day 9 (BaseA Style)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Discussion thread for day 9 of the Advent of Code - https://adventofcode.com/2023/day/9
- Labels:
- Advent of Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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)!
Batch Macro (For part 1):
"Reverse" Batch Macro (For part 2):
Iterative Macro (Finds 'Predictions' for given input row):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Today's one is easier than yesterday and can go out now!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Part 2: Same approach, but I reversed the order of the data going into the macro. At some point I thought it was a good idea to reverse what value got subtracted from what value, which was a bad idea, and is what threw off my answer for part 2. I couldn't figure out why the identical logic I used for part 1 wasn't working, and it is because I was indeed NOT using identical logic. Regardless of how quickly (or slowly) I got there, it was refreshing for the answer to be as simple as reversing the sort order of the values.
Workflow:
Macro:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My solution. I've been recalling how to make the Iterative macro more and more.
Part 1 Macro
Part 2 Macro
I removed the result calculate part from part 1 macro.
 
Part 2 Reverse version macro(I only modified the final expressions. )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 :)
Batch for Part 1
Batch for Part 2
Iterative Macro to get the Next Value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I remake the workflow. I organize my workflow by working only what I should do.
 
