Last active
December 14, 2020 15:51
-
-
Save leetwinski/faeffdd93f0d45408c84284a8f3d842f to your computer and use it in GitHub Desktop.
advent of code 2020 / 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def data-6 (clojure.string/split in-6 #"\n\n")) | |
| ;; part1 | |
| (apply + (map #(count (disj (set %) \newline)) data-6)) | |
| ;; part2 | |
| (apply + (map #(let [g-size (inc (count (filter #{\newline} %)))] | |
| (->> (frequencies %) | |
| vals | |
| (filter #{g-size}) | |
| count)) | |
| data-6)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment