r/adventofcode • • Dec 13 '18

SOLUTION MEGATHREAD -🎄- 2018 Day 13 Solutions -🎄-

--- Day 13: Mine Cart Madness ---


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 13

Transcript:

Elven chronomancy: for when you absolutely, positively have to ___.


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:44:25!

23 Upvotes

148 comments sorted by

View all comments

Show parent comment

4

u/OneParanoidDuck Dec 18 '18

Ok, the complex numbers I'm going to take for granted - I simply cannot wrap my head around that. But I don't think it's what make this code so ridiculously fast compared to mine. You iterate over the carts... whereas dumbass me chose to iterate over the grid. Why didn't I think of that. Your approach doesn't just blow mine out of the water, I feel like I should go back to school.

Guess it's for the best I keep struggling through my first ever AoC.

Thanks for sharing your solution.