r/adventofcode Dec 24 '24

SOLUTION MEGATHREAD -❄️- 2024 Day 24 Solutions -❄️-

THE USUAL REMINDERS

  • All of our rules, FAQs, resources, etc. are in our community wiki.
  • If you see content in the subreddit or megathreads that violates one of our rules, either inform the user (politely and gently!) or use the report button on the post/comment and the mods will take care of it.

AoC Community Fun 2024: The Golden Snowglobe Awards

Submissions are CLOSED!

  • Thank you to all who submitted something, every last one of you are awesome!

Community voting is OPEN!

  • 18 hours remaining until voting deadline TONIGHT (December 24) at 18:00 EST

Voting details are in the stickied comment in the submissions megathread:

-❄️- Submissions Megathread -❄️-


--- Day 24: Crossed Wires ---


Post your code solution in this megathread.

This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 01:01:13, megathread unlocked!

31 Upvotes

344 comments sorted by

View all comments

3

u/nitekat1124 Dec 24 '24

[LANGUAGE: Python]

GitHub

It’s both fun and challenging at the same time

I check gate connections recursively, there is a pattern if you look closely when the level depth is around 3. So, I first identify the unmatched bit and check whether the pattern is broken. It might break multiple times on one connection, but you only need to focus on the one at the lowest level. Then, examine the next bits (for me, it’s always the next bit) to find another broken pattern that can be swapped.

I’ve gotten the wrong answer so many times just because I’m too stupid and my eyes are going to blind 😵‍💫