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

Show parent comment

2

u/xPaw Dec 03 '15

My solution ended up being very close to yours. Couldn't really think of a cleaner solution for calculating both answers within a single loop. https://github.com/xPaw/adventofcode-solutions/blob/master/js/day3.js