July 2023
Intermediate to advanced
670 pages
17h 13m
English
If you’ve been programming for very long, you might’ve heard of the “fizzbuzz” problem. It was once a common interview question that was asked to see whether candidates could write a simple program, and it’s still used these days as a common example when teaching new programmers. There are a few minor variations of the problem, but let’s consider this version of it:
Given a number, fizzBuzzCount, return a string that contains all of the numbers from one, up to and including fizzBuzzCount, except:
If the number is evenly divisible by 3, but not evenly divisible by 5, replace it with the word “fizz”.
If the number is evenly divisible by 5, but not evenly divisible by 3, replace it with the word “buzz”.
If the number is evenly divisible ...