I've solved this using Clojure for the sake of. It seems to be the shortest one so far.
(nsday6(:require[clojure.string:refer[split]][clojure.set:refer[intersection]]))(definput(->"./day6input.txt"(clojure.core/slurp)(split#"\n\n")))(defany-answers(->>input(map#(re-seq#"\w"%))(mapset)(reduce#(+%1(count%2))0))); Part 1(defall-answers(->>input(map#(split%#"\n"))(map#(map(fn[x](set(clojure.core/char-arrayx)))%))(map#(applyintersection%))(reduce#(+%1(count%2))0))); Part 2
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've solved this using Clojure for the sake of. It seems to be the shortest one so far.