r/adventofcode • • 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

178 comments sorted by

View all comments

Show parent comment

2

u/Ytrignu Dec 09 '15

that looks a lot nicer than what I did - mostly because I didn't use an existing permutation function and just hacked something up instead of thinking about it for a moment…

1

u/twisted_tree Dec 09 '15

If you're using Java, the static imports I have really save time.

1

u/Na_rien Dec 09 '15

As someone who hasn't used permutations before, am I correct in assuming your permutations contain every possible path, so all you end up doing is comparing the total lengths of every permutation?