You are viewing a single comment's thread. Return to all comments →
Clojure
(defn rotations [s] (join " " (for [i (range 1 (inc (count s))) :let [k (mod i (count s))]] (str (subs s k) (subs s 0 k))))) (dotimes [_ (Integer. (read-line))] (let [s (trim (read-line))] (println (rotations s))))
Seems like cookies are disabled on this browser, please enable them to open this website
Rotate String
You are viewing a single comment's thread. Return to all comments →
Clojure