Advent of Code 2024 - Day 20

Hello, Erlang enthusiasts! :wave: Ukrainian Erlanger is here! :metal: Today’s challenge, Day 20, takes us to the fast-paced world of the race condition festival :racing_car::vertical_traffic_light:. With Erlang by our side, let’s navigate the racetrack, cheat the walls, and claim the mutex prize! :lock:

:bulb: Tips for tackling Day 20

  • Map Representation: Use a matrix or coordinate-based system to represent the racetrack efficiently. Track walls, paths, and start/end positions.
  • Pathfinding: Implement a shortest-path algorithm (e.g., BFS) to calculate the base path. Integrate wall-skipping logic for exploring cheat opportunities.
  • Cheating Logic: Carefully determine where and when to enable the 2-picosecond wall-skipping feature for maximum time savings.
  • Optimization: Cache intermediate results or prune unnecessary paths to handle the complexity of multiple cheat scenarios.

:sparkles: Motivation for today
Sometimes, it’s not about following the rules - it’s about knowing when to break them strategically

Feel free to share your solutions, insights, or questions below. Whether you’re sprinting through the racetrack or analyzing the best cheats, let’s tackle this challenge together!

Happy racing, and may the best cheats win! :rocket: