Advent of Code 2024 - Day 21

Greetings, fellow Erlang developers! :wave: Ukrainian Erlanger here! :metal: Today’s challenge, Day 21, takes us aboard Santa’s starship :rocket: with a robotic journey through cascading keypads and intricate sequences. Time to flex our Erlang muscles for this multi-layered problem! :computer:

:bulb: Key ideas for tackling Day 21:

  1. Graph Representation: Treat each keypad as a graph where keys are nodes and directional movements are edges. Ensure no robot ever “falls off” into the gaps! :no_entry_sign:
  2. Shortest Path Calculation: Use algorithms like BFS or Dijkstra to find the minimal sequence of button presses.
  3. Recursive Composition: Solve the inner keypads first and build up to the master directional keypad sequence.
  4. Efficiency First: Optimize for the shortest sequence to minimize both complexity and runtime.

:sparkles: Motivation for today:
Every keypress counts! Let’s master the art of robotic precision and make our way to the Historian.

Let’s collaborate, solve, and maybe even unlock new insights about Erlang’s power in solving these intricate puzzles! :rocket:

Happy coding, and may your robots always press the right keys! :christmas_tree::robot: