You are viewing a single comment's thread. Return to all comments →
Has anyone, using clojure, used a high order function to solve this? I was getting timeouts until I stopped using them. I'm curious to know if I'm just using the high order functions inefficiently. If you have such a solution please PM me.
Hi @fraburnham, btw you can access clojure submission in the contest here.
Same. At first, I tried reduce and map along with str but had the last test failed. The next thing I did was change from map/reduce to simple loop and recur, and everything worked fine. Still not quite certain why the latter bears lower complexity, though.
this worked for me
(fn [acc [a b]]
(conj acc a b))
(map list (read-line) (read-line)))))
This works too:
(apply str (mapcat list (read-line) (read-line)))
wanted to show my Clojure solution
[a b] (->> (mapcat list (seq a) (seq b))
(println (string-mingling (read-line) (read-line)))