DEV Community

Discussion on: Advent of Code 2020 Solution Megathread - Day 9: Encoding Error

 
sleeplessbyte profile image
Derk-Jan Karrenbeld

Because of the contiguous set limitation, it always works. You can't ever go down in value by moving the right end, and you can't ever go up in value by moving the left end.

It's the right approach.