Skip to content
0:00 / 0:00

#fizzbuzz

FizzBuzz: One Simple Interview Question

Tom Scott

6.7M subscribers • 29 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.

Beginner. No background in the topic needed.

3.7M views9 years ago2 recommendations

Computer scienceCareers and interviewsCoding interviewsAlgorithms

Tom Scott explains the FizzBuzz coding test, why it is used in interviews, and how to solve it.

There are a lot of opinions on how to hire coders, and most of them are terrible. The opinions, that is, not the coders. But a basic filter test to make sure someone can do what they say they can: that seems reasonable, and FizzBuzz is one of the more common tests. Even now, interviewers use it. Let's talk about why it's tricky, and how to solve it. Imran's blog post: imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers… Other approaches for pretty much every language: rosettacode.org/wiki/FizzBuzz Thanks to the Cambridge Centre for Computing History: computinghistory.org.uk/ The thing behind me is their Megaprocessor: youtube.com/watch?v=EMO3dZAizb4 And thanks to my proofreading team! 🟥 MORE FROM TOM: tomscott.com/ (you can find contact details and social links there too) ❓ LATERAL, free weekly podcast: lateralcast.com/ youtube.com/lateralcast/ ➕ TOM SCOTT PLUS: youtube.com/tomscottplus 👥 THE TECHNICAL DIFFICULTIES: youtube.com/techdif

Why it's here

2 people recommend this

What people say. Pointed to as a classic explanation of why basic coding tests like FizzBuzz are used in interviews.

u/-Kerrigan-in r/Kotlin • Recommends

On “Would changing my language make a difference?”

## This is a my personal advice that I give you biased by my own experience. YMMV I don't think Java is holding you back. Sure, give Kotlin a try, the `variable: Type` notation is allegedly more intuitive for newbies, but from your post I don't think that "grammar" (i.e. how code is written) is the roadblock. You need a comp sci basics. Look up a course that provides the information in an understandable manner. I'm a big fan of Tom Scott's "The basics" series, although it's not really designed as a coherent course. There are videos like this one that delve into algorithms in a easy to understand manner. Sure, there are many out there 'coding' left and right without a clue to how memory…

u/rekabisin r/dotnet • Recommends

On “Interviews are stupid”

> Coding tests became a necessity decades ago in response to the fact that many many programmers with impressive resumes were utterly hopeless and didn't know basic stuff like loops and functions. I remember outperforming a senior dev on fizzbuzz. And I didn’t even get anywhere as refined as Tom Scott did; I just fell through with the appropriate if/else if/else block. It was all about putting the right catches in the right order, to prevent incorrect output from getting printed. Edit: IIRC, on being challenged for efficiency I also scrapped it for a switch-case, because it can be easier for the compiler to generate jump tables for faster operation.