You are viewing a single comment's thread. Return to all comments →
Here's my haskell solution.
allRotations s = build (length s) s where build 0 s = [] build n s = let s' = rotl s in s' : build (n - 1) s' rotl s = tail s ++ [head s] main = interact (unlines . map (unwords . allRotations) . tail . lines)
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 →
Here's my haskell solution.