Last active
December 14, 2016 21:05
-
-
Save jbrestan/c4441a5e21099f704b6aaf3c31fc1e18 to your computer and use it in GitHub Desktop.
Interview buster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Complexity of O(scary)