Return strings for the integers from 1 through n. Use "FizzBuzz" for multiples of both 3 and 5, "Fizz" for multiples of 3, "Buzz" for multiples of 5, and the decimal number otherwise.
Input / output
n: integerstring[] of length nExamples
n = 5 returns ["1","2","Fizz","4","Buzz"].n = 15, the final value is "FizzBuzz".Constraints
1 <= n <= 10,000Follow-up How would you make the rules data-driven so new divisors and labels can be added without another conditional branch?