Post

Silly me. Turns our Advent of Code challenges have two parts in them, and who knew, the second part is harder 🙈 I went back and implemented the second part of the second day challenge. This might be interesting to you regardless of EdgeQL, read if you like math or SQL too. 🧵

First, the challenge: adventofcode.com/2024/day/2 TL;DR: a bunch of numbers in text. Every line of numbers is a "record". How many records are ordered with elements differ only by 1, 2, or 3? A record is also fine if it satisfies these rules without one of its elements. 😱

Remember, EdgeQL is declarative and functional, so it's not your typical Java code. We need to be a bit creative with this task. Let's expand every "record" into a set of "records" that we'll be trying to lobby through the rules:

No replies yet.