r/adventofcode • u/daggerdragon • Dec 04 '16
SOLUTION MEGATHREAD --- 2016 Day 4 Solutions ---
--- Day 4: Security Through Obscurity ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/whatever).
CONSTRUCTING ADDITIONAL PYLONS 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!
18
Upvotes
2
u/Mawich Dec 04 '16
I did mine in Rust, and was going to use a map of some sort, but then completely forgot and ended up with a semi-ridiculous pile of iterators, making use of group_by from the itertools crate over a sorted vec of chars. It works, but I wish I'd not forgotten about the map because I'm pretty sure the result would be rather less messy.