Heaps of fun with shortest paths - Day 17 - Advent of Code 2023

In this episode you'll learn how to solve day 17's "Clumsy Crucible" puzzle. We walk through implementing a shortest path algorithm to find the route through a grid-based map with the lowest "heat loss".

Using a greedy approach to explore minimum heat paths first
Implementing a visited set to avoid exploring already visited states
Switching from arrays to a heap data structure for faster state exploration
Adding directional state to track movement rules (max 3, later 4-10 blocks)

We'll start with a simple test case to incrementally build a basic solution, then extend it to handle the full puzzle input.

Advent of Code: https://adventofcode.com/
My Solutions: https://gist.github.com/cjavdev/d15a2a4ffed6c840c2fb28a093e9f927/
Playlist https://www.youtube.com/playlist?list=PLS6F722u-R6KYlGyUv65EFpGKl2Esmurr

#adventofcode #ruby