← All questions
EasyCoding
Fizz Buzz
Asked at
Amazon
1Give yourself 5 minutes
2Answer out loud, not in your head
3Then compare with the answer below
0
Stuck? Show a way to structure it+
- 01Iterate from one through n.
- 02Test divisibility by both factors first.
- 03Then test each individual factor.
- 04Otherwise emit the number.
- 05Validate boundary and ordering behavior.
Reference answer
Then expect these follow-ups
How would you generalize this to configurable rules?
Tests: follow-up reasoning
What tests catch branch-order bugs?
Tests: follow-up reasoning
Free to read · better with Enzo
Practice this out loud with Enzo
Enzo runs it as a mock interview, pushes back with follow-ups, and grades you on the rubric.
Next question