r/adventofcode • u/daggerdragon • Dec 09 '15
SOLUTION MEGATHREAD --- Day 9 Solutions ---
This thread will be unlocked when there are a significant amount of people on the leaderboard with gold stars.
edit: Leaderboard capped, achievement thread unlocked!
We know we can't control people posting solutions elsewhere and trying to exploit the leaderboard, but this way we can try to reduce the leaderboard gaming from the official subreddit.
Please and thank you, and much appreciated!
--- Day 9: All in a Single Night ---
Post your solution as a comment. Structure your post like previous daily solution threads.
11
Upvotes
View all comments
Show parent comment
2
u/taliriktug Dec 09 '15
Nice one! I especially like a trick with map and lambda. Btw, you can use
defaultdictto slightly simplify code:My first version was a stupid one with my own permutations. What I like about AdventureOfCode is that you can learn from others. I already saw itertools and I know they are great, but somehow I totally forgot about them solving this quiz. Probably, only real usage can help you remember things. So, version above is my revision of this quiz.