Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What's your go-to FizzBuzz-style interview question?
13 points by orthoxerox 11 months ago | hide | past | favorite | 24 comments
I am not talking about Leetcode-level questions that expect that the interviewee will spend ten to twenty minutes whiteboarding a complex algorithm, but a quick question that shows whether it's worth talking with the candidate at all.



I never ask that kind of question because the candidate's ability to solve silly FizzBuzz-style problems tells nothing about their fitness to the jobs I hire for.


But isn’t it a quick way to determine their fitness to not do the job you hire for?


Knowing that they can is useless because a) their job is never going to involve solving FizzBuzz or 99 bottles of beer, and b) it is not indicative of anything useful.

Knowing that they can't is equally useless… and for the same reasons.

It is totally irrelevant.


It tests whether you can write a simple loop with a couple of ifs - not being able to do it is definitely an indicator that you won't be able to complete more advanced programming tasks. And pretty much any other programming task is more advanced.


The technical interview stage is a tiny bit too late for wondering if the candidate can write a simple loop.


Before you do a technical interview, you send them a website and ask them to write that FizzBuzz equivalent for you, or if you want to be seen to be nice, schedule a 30 minute interview with them and ask the FizzBuzz thing.

It doesn't have to be asked during the full technical interview stage.


Again, I see zero value in those silly tests so I won't force them on anyone, at any stage of the process. That would be a waste of everyone's time.


Why would you do fizzbuzz in a technical interview and not have them talk through it in the first 15 minute phone screen?


Not even one minute. Those things are worthless.


Oh sorry, didn’t realize.


I typically have 2 multipart questions:

1) By looking at the resume I chose a prominent project they claim to have worked on, or for interns / recent grads ask them for about a major project: Please describe in detail what you did on this and what unique challenges? Looking for details and passion about working late to find some obscure problem, or the joy of completion. Trying to avoid the person who just added something that they attended meetings on or similar light contribution.

2) "so you know what a binary tree is?"

answer "oh yes it is a ...".

"Good, you know about balanced trees?"

answer "oh yes ..."

"and a b tree?"

Answer "yes"

"What is the difference?"

?

The answer I was looking for is: "I do not know".

Ideally followed with "but I know where to get the answer"

Ideally followed with the explanation, in their own words in the 'Thank you letter'

Demonstrates Honesty before Ego / Fake it till you make it etc

Thinking (but I know where)

Follow through - with thank you letter.

Anything they answer I would write down, because I could never remember the correct answer.

I have not done interviewing for a while as my job is different now.


I am currently interviewing a lot of data engineers and I use the following question:

Given a table that contains a history of spot readings from many different sensors

  readings(sensor_id bigint, reading_ts timestamp, reading_value decimal)
show me the latest known reading for each sensor.

Things I look at:

1. Does the candidate immediately reach for a window function?

2. Can they do it without a window function?

If the candidate fails at this stage, it's a no-hire, then I can use the same task to check their seniority.

3. Do they actually know the right window function?

4. Can they explain why a window function is better here than grouping in a subquery?

5. Can they do it in an imperative language?

If they can answer at least two out of three, they are a solid middle.

6. Can they suggest a way to store the data that makes the query take O(number of sensors) time?

Okay, this is a senior engineer.


Funny enough, I would fail your interview. But not because I don't know how to solve the problem, but because I don't know how to solve the problem without Google and/or documentation. My struggle is: I can come up with some working solution by myself, but I always know that my solution is "not the best", so after "solution v1 made entirely by myself", I jump into Google and find out what's "the best way to solve my little problem". After a few iterations, I come up with "solution v4 by myself and the help of the internet" which turns out to be way better than v1.

My v1 would not pass your interview. My v4 would be a world-class solution. Fair enough, you are not looking for my v4, and rightfully so I should fail your interview (because I bet there be some people out there who can produce world-class solutions without relying on external sources)


I would definitely agree with you.

I can’t do without documentation or google.

And that makes me think am i a bad programmer


> And that makes me think am i a bad programmer

You’re not. We all need documentation and google, and anyone who claims otherwise will eventually shoot themselves in the foot.

I’ve definitely given interview questions my best shot and admitted where I’d defer to the internet.


We use similar questions with the exception of #6 - our data sets are small enough that just getting a correct query is fine. We add a small relational design exercise to see if they understand data modeling 1-to-N and M-N relationships.

Totally curious - what is your fail rate like for applicants at the first stage for the window function? We are happy with more junior engineers who usually haven't used a window function but can currently do simple queries and an easy candidate to move forward with will come up with a group by subquery . . .

I'm guessing that 2/3 to 3/4 of our in-person interview candidates look (on paper) like they could handle simple queries and grouping but struggle in the interview context.


I am currently interviewing junior engineers (recent graduates with little experience) and among them about 50% say, "oh, I know this has something to do with window functions", but I usually warn them it can be solved without them. About two thirds of this group the solve it via a subquery vs about one third of the other group. Practically no one so junior can do it via a window function.


idk, but imho. (!)

* coding-questions are mostly meaningless crap and nobody should rely on them

and more generally

* there is no "single & quick" solution for assessing the quality / abilities of a person

you have to come up with your own solution to determine if someone fits your needs ...

with experience in talking to people, someone gets a feeling / grasp of correlations who makes a good candidate and who wouldn't.

and you develop your own lets call them "signaling questions" on selected topics based the needs and on the feedback you get from your specialist-teams/-departments and colleagues.

but you have to seriously work on that!! ;)

just my 0.02€

ps. o.T here, but the same is true for applicants in assessing the quality of companies where they are applying for positions/projects... just saying ;))


I push a boiled egg and an egg cup towards the candidate and ask them to eat it like x86 processor.

- If they put the egg in the cup the upside-down, its a fail

- If its right-side up with solid rationale, I know its a senior. Without rationale - I know its a lucky junior.

- If they immediately grab the egg and swallow it without saying a word they are destined for management

- If they take out a cap'n crunch whistle and blow on it while giving me a red card, I have to resign and let them take over the reigns


and what if they chuck the egg at the wall?


Project manager


Some random simple string processing task that involves opening a file, iterating and sorting through stuff would probably be fine.


If you were a tree, what kind of a tree would you be.

This is what happens when sycophants get promoted.


i hope i will never have to interview with you in my life




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: