Given an integer n, return a string array answer (1-indexed) where:
n
answer
answer[i] == "FizzBuzz"
i
answer[i] == "Fizz"
answer[i] == "Buzz"
answer[i] == i
n = 5
["1","2","Fizz","4","Buzz"]
n = 3
["1","2","Fizz"]
1 <= n <= 10^4
Topics
Implement fizzBuzz in the editor and return the answer — printing it is never graded.
fizzBuzz
Problem 3 of 1146 in the arena