Category: Questions

  • Fizz Buzz Implementation Basic Part 2

    The most common examples seen in imperative languages try to “tell” the machine what to do; something like: std::string fizzbuzz(int n) { if(n%3 == 0 && n%5 == 0) return “FizzBuzz”; else if (n%3 == 0) return “Fizz”; else if (n%5 == 0) return “Buzz”; else return std::to_string(n); } I don’t know about you, but […]

  • Fizz Buzz Implementation Part 1

    Fizz Buzz is a very simple programming task, asked in software developer job interviews. A typical round of Fizz Buzz can be: Write a program that prints the numbers from 1 to 100 and for multiples of ‘3’ print “Fizz” instead of the number and for the multiples of ‘5’ print “Buzz”.  1, 2, Fizz, 4, […]