MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3uyl7s/daily_programming_puzzles_at_advent_of_code/cxjq47y/
r/programming • u/Aneurysm9 • Dec 01 '15
179 comments sorted by
View all comments
Show parent comment
3
Did it in 11:
sm?qd\(1_1z s sum | m map | | ? ternary | | | q equality | | | | d current item of list | | | | \( parenthesis literal | | | 1 1 literal (if equality is true) | | | _1 -1 literal (if equality is false) | | z the input
1 u/Pwntheon Dec 02 '15 Nice solution. I was trying to do something like this but kept getting errors when doing loops and\or branching. Didn't think of using map.Did you try the second one?
1
Nice solution. I was trying to do something like this but kept getting errors when doing loops and\or branching. Didn't think of using map.
Did you try the second one?
View all comments
Show parent comment
3
u/Syrrim Dec 01 '15
Did it in 11: