4 ms·
When I interview programmers I start off with this question: Write a function in C (on the whiteboard) that takes an array of integers and returns its sum. I
by orp 16y ago
When I interview programmers I start off with this question:
Write a function in C (on the whiteboard) that takes an array of integers and returns its sum.
I explicitly explain to candidates that this is a warm-up question to start the interview, and that I'm looking for the textbook solution, no tricks.
The advantages are:
1. It takes a reasonable candidate 3 minutes to write down the answer.
2. Answering a question correctly gives them confidence, always important in an interview.
3. It provides a good basis for a little advanced discussion (overflow, speed, error handling, supporting infinitely large numbers, etc).
Amazingly enough, some candidates have actually failed this...
- ivenkys 16y agoThis is the right approach. If an interview is like dating/flirting then you don't start by asking the prospective partner about their life philosophy you start by talking about the weather. "Amazingly enough, some candidates have actually failed this..." - that is just sad.