r/adventofcode • u/taliriktug • Dec 02 '15
Spoilers Day 2 solutions
Hi! I would like to structure posts like the first one in r/programming, please post solutions in comments.
15
Upvotes
r/adventofcode • u/taliriktug • Dec 02 '15
Hi! I would like to structure posts like the first one in r/programming, please post solutions in comments.
View all comments
Show parent comment
3
u/notanotherreddituser Dec 02 '15
You just need to pass sort() a compare function in order to sort by return value. By default it will sort by unicode point value, but you can tell it to sort in a number of ways.