Rules: no spoilers.

The other rules are made up as we go along.

Share code by link to a forge, home page, pastebin (Eric Wastl has one here) or code section in a comment.

  • zogwarg@awful.systems
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    Day 17: Clumsy Crucible

    Intimidating at first, so I went shopping for christmas presents first, which engaged my brain juices.

    [Language: jq]

    https://github.com/zogwarg/advent-of-code/blob/main/2023/jq/17-b.jq

    In hindsight this is is searching for the shortest path in a graph, making sure that each square is actually two nodes, for when approached vertically or horizontally. My shcool days are distant now, and i wonder how far from optimal my implementation is ^^.

    Part two was only a small edit from part one for me, and the code actually ran faster! from ~45s -> ~20s.