http://qs321.pair.com?node_id=42040

I'm often called upon to interview people for various technical positions. Whether we're hiring specifically for engineers or not, candidates should be able to be able to problem-solve and think logically. In fact, some of the best answers I've gotten have come from self-professed non-programmers.

I generally ask an "algorithm" question that can get progressively harder as I change inputs on them. I don't make the candidate code in a particular language (in fact, I encourage them to use pseudo-code). I'm only really interested in how they come up with the algorithm. As an example, I usually ask the candidate to reverse individual words in a sentence, maintaining word order (e.g., "THIS IS A SENTENCE" produces "SIHT SI A ECNETNES"). If they nail that, I change the input to "This is a sentence." and ask them to keep the capitalization and punctuation positions the same (e.g. "Siht si a ecnetnes."). And so on... I thought of a couple last night which I'll try out in the next few interviews (I'll post them if there's enough interest, otherwise just /msg me if you're curious).

Does anyone have any other interesting questions along these lines? I'm getting kind of tired of asking the same couple of questions. :-)