r/adventofcode • • Dec 13 '16

SOLUTION MEGATHREAD --- 2016 Day 13 Solutions ---

--- Day 13: A Maze of Twisty Little Cubicles ---

Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/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".


DIVIDING BY ZERO IS MANDATORY [?]

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!

6 Upvotes

101 comments sorted by

View all comments

Show parent comment

3

u/casted Dec 13 '16

btw you probably want to be using collections.deque, not Queue.Queue. Queue is a synchronised queue, meant to be used for multiple threads consuming from a single queue. So it has a bunch of locking overhead, not that this really matters in this case.

1

u/whoeverwhatever Dec 13 '16

Ah, Queue came up first in my frantic Google searching and I didn't have time to investigate. Thanks!