Day 9, part 2
Day 9 challenge of the mighty Advent of Code 2024
Created at:
Last updated:
Table of Contents
Introduction
Welcome to the par two of day 8 puzzle. First part is described in Day 9, part 1. Please get familiar with the part 1 before jumping into this article. This part of the challenge is available only when you successfully finished the part 1. The second part of the challenge is described under section here.
New problem
So, as you remember, in the first part we were predicting the next value for a given sequence of numbers. Now we are asked to calculate the preceding number instead and give the sum of those number as a final result. Let's do the analysis on the test data once more.
From here we know that is and is . For the remaining two lines of test data the predictions are and respectively. This gives us a sum of .