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

17 Upvotes

168 comments sorted by

View all comments

Show parent comment

1

u/cashews22 Dec 04 '16

You could implement the sort interface and set your own sort rules. Take a look at this https://golang.org/pkg/sort/#example__sortMultiKeys.

I use it in my solution(not perfect): https://github.com/cashew22/adventofcode2016/blob/master/4/solve.go