
Ask HN: Favorite Basic Programming Interview Question? - dyeje
I&#x27;m conducting some short interviews with college grads for junior positions.  I have the interviews mapped out, but I&#x27;m still deciding on some simple programming questions to start with.<p>Do you have any short, simple questions you like?
======
mamaniscalco
"Write a function which produces the prime factors of a given integer."

The kinds of people that I'm tasked with interviewing are not web developers
nor user interface types but are generally more back end/non off the shelf
solutions type of programmers. I also point out that I realize that it's an
atypical programming question and I let them think about it on their own for
5-10 minutes if needed before helping them along if they go astray.

How they react to the question is as telling as how long it takes them to
realize that they do not need a function to determine if a number is prime or
not.

------
twobyfour
Fizzbuzz?

I find the reaction to being asked such an "elementary" question as
informative as the approach and solution.

And then there are the "programmers" who can't write a solution.

The rest depends on your niche. For instance, I like asking junior server side
web developers to design (but not write all the code for) a URL shortening
system. It's simple enough to describe in 10 minutes on a whiteboard but
complex enough to spur conversations about decisions and trade-offs.

