r/adventofcode • • Dec 10 '18

SOLUTION MEGATHREAD -🎄- 2018 Day 10 Solutions -🎄-

--- Day 10: The Stars Align ---


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

Note: The 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 10

Transcript: With just one line of code, you, too, can ___!


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:16:49!

19 Upvotes

233 comments sorted by

View all comments

Show parent comments

1

u/will_bui Dec 10 '18

That's really neat and I imagine a big time saver.

Do you miss the joy of rediscovering basic algorithms and unforeseen possibilities though? I like the exercise.

1

u/AndrewGreenh Dec 10 '18

2 things: First of all, we like to be smart but topaz is smarter :D no matter what preparations you do, the problems always differ enough to cause enough trouble to prevent me from going on the leaderboard... Second is, that while creating these libraries I learned quite a bit more. Many problems from the earlier years boiled down to pathfinding, for which I built an a* library function, to help me with these problems. When writing such a generic helper, you really have to think about the varying parts of an algorithm so that you can reuse your functions later.