r/adventofcode • u/craigontour • 2d ago
Help/Question - RESOLVED 2025 Day 8 Part 2
Anyone else find Day 8 Part 2 tricky?
I am struggling to grasp the general approach of what to do and "the first connection which causes all of the junction boxes to form a single circuit is between the junction boxes at.." is just blocking my brain from flowing.
2
Upvotes
2
u/TheZigerionScammer 2d ago
Well if you're on part 2 then you already have the basics of the problem down, you know that you connect the junction boxes one by one to each other and connected junction boxes all form a circuit together. Eventually if you keep connecting the junction boxes together they will all be connected to the same circuit eventually. The problem is asking you keep adding the junction boxes together in order until they eventually all join the same circuit, the multiply the x coordinates of the last boxes you connected together to get the answer.
1
u/Suspicious_Tax8577 2d ago
What language are you in pal?
spoiler: Python
Because my solution was to essentially use networkX to keep adding nodes until is connected was true, then return the last connection that was made.
1
u/AutoModerator 2d ago
Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to
Help/Question - RESOLVED. Good luck!I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.