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

Поділитися
Вставка
  • Опубліковано 26 сер 2024
  • 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: adventofcode.com/
    My Solutions: gist.github.co...
    Playlist • Advent of Code
    #adventofcode #ruby

КОМЕНТАРІ •