jonfriese / fizzbuzz_playgound

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

###FizzBuzz Simple A simple FizzBuzz solution in a very human readable format.

###FizzBuzz Extended A script that allows a user to input a hash with as many key, value pairs as they want. It will return a FizzBuzzed array. It uses two recursive functions that modify an array of values using the map! method.

###FizzBuzz Extended String Concatenation A solution to the FizzBuzz extended problem that finds all combinations using a recursive function. It will return a FizzBuzzed array. It is a simpler, more complete solution than FizzBuzz Extended, with the only caveat being it has to create a second array of n size while FizzBuzz extended doesn't.

####Output Difference Given a hash of: { 3 => "Fizz", 5 => "Buzz", 7 => "Sivv", 11 => "Bahhh" }

'FizzBuzz Extended' will return "Bahhh" for 33, while 'FizzBuzz Extended String Concatenation' will return "FizzBahhh"

Both will return "FizzBuzzSivv" for 105.

About


Languages

Language:Ruby 100.0%