You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
(defn find-marker [data n]
|
|
(->> data
|
|
(partition n 1)
|
|
(map #(apply distinct? %))
|
|
(take-while false?)
|
|
(#(+ n (count %)))))
|
|
|
|
(let [data (slurp "input")]
|
|
(doseq [ind [4 14]]
|
|
(println (find-marker data ind))))
|