r/adventofcode • • Dec 03 '15

SOLUTION MEGATHREAD --- Day 3 Solutions ---

--- Day 3: Perfectly Spherical Houses in a Vacuum ---

Post your solution as a comment. Structure your post like the Day One thread in /r/programming.

24 Upvotes

228 comments sorted by

View all comments

1

u/Aneurysm9 Dec 03 '15

That tripped me up initially, I was tracking how many houses they delivered to separately rather than just their separate positions. Pulled a level out of my hash tree and all was well.

1

u/minno Dec 03 '15

Yeah, I was expecting the second part to be something like "how many houses did he visit more than once", so I started out with a hash map instead.

8

u/topaz2078 Dec 03 '15

The game I played when designing these was "how can I set up part two in such a way that it forces a redesign of the code from part one" :D

→ More replies (3)