FastPrepFizz and Buzz Words From 1 to n
Problems/Fizz and Buzz Words From 1 to n

Fizz and Buzz Words From 1 to n

DocuSign logoDocuSign● EasyINTERNPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A report from September 2026 lists this classic counting word game as one of two questions in a coding interview.

The report names the game only. Here you get n from 1 to 1,500 and return the words for 1 to n as a list of strings. The usual rules apply. Multiples of 3 give Fizz, multiples of 5 give Buzz, and multiples of both give FizzBuzz. We wrote the examples.

Our version is about 90% the same as the reported question.

You are given a whole number n. Write one word for each number from 1 up to n, in order:

  • A number that is a multiple of both 3 and 5 becomes "FizzBuzz".
  • A number that is a multiple of 3 but not 5 becomes "Fizz".
  • A number that is a multiple of 5 but not 3 becomes "Buzz".
  • Any other number is written as its decimal digits, so 11 becomes "11".

Return the n words as an array of strings. The first word is for 1.

Function

fizzBuzzWords(n: int) → String[]

Examples

Example 1

n = 6return = ["1","2","Fizz","4","Buzz","Fizz"]

1, 2 and 4 are written as numbers. 3 and 6 are multiples of 3, so they become "Fizz". 5 is a multiple of 5, so it becomes "Buzz".

Example 2

n = 15return = ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14","FizzBuzz"]

3, 6, 9 and 12 become "Fizz", and 5 and 10 become "Buzz". 15 is a multiple of both 3 and 5, so it becomes "FizzBuzz". Every other number is written as itself.

Example 3

n = 2return = ["1","2"]

Neither 1 nor 2 is a multiple of 3 or 5, so both are written as numbers.

Constraints

  • 1 <= n <= 1500

More DocuSign Phone Screen questions

  • Symmetric Binary TreePHONE SCREEN · Seen Oct 2026
  • Union Area of Two RectanglesPHONE SCREEN · Seen Oct 2026
  • Execute Cursor-Based Text Editor OperationsPHONE SCREEN · Seen Sep 2026
  • Minimize Array Sum After K Halving OperationsPHONE SCREEN · Seen Sep 2026
  • Two Positions That Add Up to a TargetPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Rain Kept Between WallsPHONE SCREEN · Seen Mar 2026
  • Exact Palindrome CheckPHONE SCREEN · ONSITE INTERVIEW · Seen Apr 2022
  • Reverse the Characters of a TextPHONE SCREEN · ONSITE INTERVIEW · Seen Apr 2022
  • Rebuild a Trip From Flight TicketsPHONE SCREEN · Seen Apr 2019
  • Find the Words for Each PrefixPHONE SCREEN · Seen Sep 2018

Similar questions at other companies

  • Subtract Two Large Number StringsStackAdapt · PHONE SCREENStackAdapt interview questions
  • Fair Coin from a Biased CoinAnthropic · PHONE SCREENAnthropic interview questions
  • Fizz BuzzBloomberg LP · PHONE SCREENBloomberg LP interview questions
  • Double-Base PalindromesxAI · PHONE SCREENxAI interview questions
  • Add Signed Character ArraysByteDance · PHONE SCREENByteDance interview questions
  • Per-Segment SpeedingOnePay · PHONE SCREENOnePay interview questions
  • Add Decimal Strings ExactlyMeta · PHONE SCREEN · ONSITE INTERVIEWMeta interview questions
  • Format a Centered Pagination BarMixpanel · PHONE SCREENMixpanel interview questions
  • Get Max DeletionsJP Morgan Chase · OAJP Morgan Chase interview questions
  • Add Two Numeric Strings with CarryZipRecruiter · ONSITE INTERVIEWZipRecruiter interview questions

Interview reports that mention this question

  • DocuSign SWE Intern Interviews: 27 Experiences (Part 2 of 2)
  • DocuSign SWE Intern OA Questions: 53 Experiences (Part 1 of 2)
All DocuSign interview questionsSee DocuSign hiring insights
Saved
class Solution {
    public String[] fizzBuzzWords(int n) {
        // Write your code here.
    }
}
Checking account…