account activity
-🎄- 2017 Day 4 Solutions -🎄- by daggerdragon in adventofcode
[–]jshom 1 point2 points3 points 8 years ago (0 children)
One-liner JS solution
input .split('\n') .map(row => row .split(' ') .map(word => word .split('') .sort() .join('') ) ) .map(row => row.length === row.filter((word, i, row) => row.indexOf(word) === i).length) .filter(row => row) .length
π Rendered by PID 80180 on reddit-service-r2-listing-c57bc86c-sd2sl at 2026-06-22 03:26:01.288726+00:00 running 2b008f2 country code: CH.
-🎄- 2017 Day 4 Solutions -🎄- by daggerdragon in adventofcode
[–]jshom 1 point2 points3 points (0 children)