Day 5, part 2
Day 5 challenge of the mighty Advent of Code 2024
Created at:
Last updated:
Table of Contents
Introduction
Hello and welcome to part 2 of the day 5 Advent of Code puzzle. This is a continuation of the task and code written in Day 5, part 1, so please get familiar with that before you do the part 2. 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.
What is the new problem
Now we have the new rule for the seed numbers we had before. Previously we were treating each number as a separate seed and we did the calculations for those seeds. Now the seed numbers are actually a ranges. Each pair of seed number represents the starting seed number and the length of the range respectively. If we take a look at the test data again:
we can see that our seeds are two seed ranges: