r/adventofcode • • Dec 25 '18

SOLUTION MEGATHREAD ~☆🎄☆~ 2018 Day 25 Solutions ~☆🎄☆~

--- Day 25: Four-Dimensional Adventure ---


Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).

Note: Top-level posts in Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


Advent of Code: The Party Game!

Click here for rules

Please prefix your card submission with something like [Card] to make scanning the megathread easier. THANK YOU!

Card prompt: Day 25

Transcript:

Advent of Code, 2018 Day 25: ACHIEVEMENT GET! ___


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

edit: Leaderboard capped, thread unlocked at 00:13:26!


Thank you for participating!

Well, that's it for Advent of Code 2018. From /u/topaz2078 and the rest of us at #AoCOps, we hope you had fun and, more importantly, learned a thing or two (or all the things!). Good job, everyone!

Topaz will make a post of his own soon, so keep an eye out for it. Post is here!

And now:

Merry Christmas to all, and to all a good night!

13 Upvotes

81 comments sorted by

View all comments

Show parent comment

4

u/14domino Dec 25 '18

How'd you already have all that code, especially the UnionFind.. lol

5

u/cj81499 Dec 25 '18

Lots of people who are super serious about the leaderboard have many utility functions/classes written ahead of time, such as input readers, grid operations, repeating/circular lists, etc.

3

u/algmyr Dec 25 '18

I know people who have dabbled with competitive programming or similar keep a lot of code around, and union-find is one of the most common data structures to find in someone's library. Useful for a large number of tasks (see Kruskal's algorithm for finding a minimum spanning tree for one).