Advent of Code 2021 - Day 1, Puzzle 2
Photo by Any Lane from Pexels
I’m participating in the Advent of Code 2021 (@adventofcode). Here’s my solution for Day 1, Puzzle 2 - Three Measurement Sliding Window
Problem Puzzle 2 involves a more refined measurement of the depth readings by comparing measurements of 3 consecutive readings to the next 3. By that we mean, taking the sum of measurements 1, 2 & 3, and then comparing that to the sum of 2, 3 & 4. If thats an increase, then we count it. We’ll use the same input list of 2000 measurements we used for Puzzle 1.