Advent of Code 2024 - Day 25

Hello, Erlang enthusiasts! :star2: Ukrainian Erlanger is here! :metal: We’ve reached the final challenge of Advent of Code 2024! Today’s task is a true test of logic and precision as we navigate the intricacies of virtual five-pin tumbler locks and their matching keys.

:closed_lock_with_key: Challenge Highlights
Today’s puzzle involves determining how many unique lock/key pairs can fit together without overlapping in any column. We’re transforming schematics into heights and simulating whether a key matches a lock by ensuring compatibility in all columns.

:sparkles: Tips for Solving in Erlang

  • Parse the schematics into lists of heights for locks and keys. A good representation could be [0, 5, 3, 4, 3] for a lock.
  • Use recursion or list comprehensions to check every key against every lock.
  • Optimize by filtering incompatible pairs early—Erlang’s pattern matching can help here!

:bulb: Motivation for the Final Day
This is the last step of an incredible coding journey! Whether you’ve solved every day or just a few, today’s puzzle is an opportunity to wrap up with style.

Share your solutions, thoughts, and experiences below. How are you representing the schematics? Did you face any performance challenges with the comparisons? Let’s collaborate and celebrate the end of this year’s coding adventure! :tada:

Thank you to everyone who joined in the Erlang Advent of Code journey. Here’s to solving puzzles and beaming together! :rocket: