Clojure & algorithm platforms
·Oct 8, 2022·
1 min read
Have you ever heard about LeetCode, TopCoder, HackerRank and similar platforms?
I have bad news - the most popular ones do not support Clojure 😕
Hopefully I have found 2 that do:
👎 CodeChef - I tried to solve some hello world problem and got TLE, people had similar experiences (link) -> I cannot recommend this platform.
👍 SPOJ - it worked for me with test problem like this one.
Below is solution if you are interested.
(defn read-int  (let [l (read-line)] (Integer/parseInt l))) (defn main  (let [n (read-int)] (when (not (= n 42)) (println n) (recur)))) (main)