Expand description

Use Djikstra’s to traverse the grid, as there isn’t a good heuristic for A*.

All real work is done in day15::a_star.

The main difficulty was misreading the instructions and tiling incorrectly. Rust also doesn’t appear to have an efficient priority queue, so we emulate one with a std::collections::BTreeMap and Vec.

Constants

The input map is 100x100.

Functions

Implement A* with a heuristic of 0, also known as Djikstra’s.

Parse directly to a 2D array.

Directly calls a_star on the input.

Directly calls a_star on the input.

Type Definitions

We’re limited by memory here, so want the smallest datatypes we can use.

We’re limited by memory here, so want the smallest datatypes we can use.

We knows the input will be in [0, 9].