Advent of Code 2022 - Day 9 with PostgreSQL

Опубликовано: 11 Июнь 2026
на канале: Ryan Booz
29
2

For the 2022 Advent of Code I wanted to use #PostgreSQL and #SQL to solve the puzzles each day.

Day 9 was a challenge for me, particularly Star 2. Ultimately, I used arrays and recursive CTEs to solve this puzzle, but not without a number of trial and error.

#adventofcode

00:00 - Start
01:03 - Puzzle description
02:50 - Star 1 - First attempt
07:21 - Star 1 - Solution
11:05 - Star 2
11:51 - Star 2 - Solution 1 (slow)
12:59 - Star 2 - slow
19:39 - Star 2 - Faster solution