FastPrepFizz Buzz
Problems/Fizz Buzz

Fizz Buzz

Bloomberg LP logoBloomberg LP● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A report from a Bloomberg interview for a site reliability role in January 2025 lists the classic fizz-buzz exercise as one of two scripting tasks in its first technical round, next to several networking and operating-system questions. It gives no statement, limits or example, and asks for the work in one scripting language.

Everything else here is our practice choice. You return a list for the numbers 1 to n instead of printing them. Multiples of both 3 and 5 become FizzBuzz, other multiples of 3 become Fizz, other multiples of 5 become Buzz, and every other number is written as plain decimal text. The value n is from 1 to 2000, and any language may be used.

The judged task matches the report at about 90%.

Given an integer n, return a list of n strings for the numbers 1, 2, ..., n, in that order. The item for number i is:

  • "FizzBuzz" if i can be divided by both 3 and 5.
  • "Fizz" if i can be divided by 3 but not by 5.
  • "Buzz" if i can be divided by 5 but not by 3.
  • The number i itself, written as text (for example "7"), in every other case.

The words must be spelled exactly as shown, with capital F and B and no spaces.

Function

fizzBuzz(n: int) → List<String>

Examples

Example 1

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

3 and 6 can be divided by 3, so they become "Fizz". 5 can be divided by 5, so it becomes "Buzz". The other numbers stay as they are, written as text.

Example 2

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

15 can be divided by both 3 and 5, so it becomes "FizzBuzz". The other multiples of 3 (3, 6, 9, 12) are "Fizz", and the other multiples of 5 (5, 10) are "Buzz". 16 and 17 are not multiples of either, so they stay "16" and "17".

Example 3

n = 12return = ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz"]

The multiples of 3 are 3, 6, 9 and 12, so they become "Fizz". The multiples of 5 are 5 and 10, so they become "Buzz". No number up to 12 is a multiple of both, so there is no "FizzBuzz". The list ends on "Fizz".

Constraints

  • 1 <= n <= 2000

More Bloomberg LP Phone Screen questions

  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fewest Coins CombinationPHONE SCREEN · Seen Nov 2026
  • Recommend Films from Viewers Who Watched Everything You DidPHONE SCREEN · Seen Nov 2026
  • Track New Values in Sorted OrderPHONE SCREEN · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Sparse Vector and Matrix OperationsPHONE SCREEN · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026

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 and Buzz Words From 1 to nDocuSign · PHONE SCREENDocuSign 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

Bloomberg LP interview experiences

  • Bloomberg SWE Phone Screen and Onsite: 1 Experience
  • Bloomberg SWE Phone Screens with Two Teams: 1 Experience
  • Bloomberg AI Interview, Hiring Level Not Reported: 2 Experiences
  • Bloomberg Experienced SWE AI Coding Interviews: 2 Experiences
  • Bloomberg New Grad AI-Assisted Coding Rounds: 3 Experiences
  • Bloomberg New Grad SWE AI-Assisted Coding Rounds: 1 Experience
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public List<String> fizzBuzz(int n) {
        // Write your code here.
    }
}
Checking account…