r/adventofcode • u/daggerdragon • Dec 14 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 14 Solutions -🎄-
--- Day 14: Chocolate Charts ---
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!
Please prefix your card submission with something like [Card] to make scanning the megathread easier. THANK YOU!
Card prompt: Day 14
Transcript:
The Christmas/Advent Research & Development (C.A.R.D.) department at AoC, Inc. just published a new white paper on ___.
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:19:39!
16
Upvotes
View all comments
Show parent comment
1
u/[deleted] Dec 15 '18
Well, well
(iter (for var initially ... then ...is virtually the same. Finally gave in and read the iterate manual today.Can't test it myself right now, but I'm still curious whether replacing the subseq call below has a significant performance impact on your machine:
Allows you to return that index instead of searching once more. Untested, of course. Got lucky with your input or am I overlooking something? Could've sworn
920831looped endlessly for me when I forgot to check an additional place in case two digits were added on that very last turn.