about | help | code help+videos | done | prefs |
A famous programming interview problem is the FizzBuzz problem. This is a slightly modified version. Given an integer "num", make a String array of that size. Then, fill it with the Strings "1", "2", "3", "4", ... etc, BUT, whenever you hit a multiple of 3, replace it with "Fizz" and if you hit a multiple of "5" replace it with "Buzz". If the number is a multiple of both 3 and 5, instead replace it with "FizzBuzz". Look at the example inputs and outputs! logic_fizzBuzz(3) → ["1", "2", "Fizz"] logic_fizzBuzz(4) → ["1", "2", "Fizz", "4"] logic_fizzBuzz(5) → ["1", "2", "Fizz", "4", "Buzz"] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy