Skip to content

Instantly share code, notes, and snippets.

@jbrestan
Last active December 14, 2016 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbrestan/c4441a5e21099f704b6aaf3c31fc1e18 to your computer and use it in GitHub Desktop.
Save jbrestan/c4441a5e21099f704b6aaf3c31fc1e18 to your computer and use it in GitHub Desktop.
Interview buster
fizzbuzz n = last $ zipWith fb fbs [1..n]
where
fbs = zipWith (++) (cycle ["","","fizz"]) (cycle ["","","","","buzz"])
fb s m = if s == "" then (show m) else s
map fizzbuzz [1..100]
@jbrestan
Copy link
Author

Complexity of O(scary)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment