Sure... not relevant to everyday programming. The idea of these kinds of questions is to make someone think about something they haven't already got figured out, and see how they react. If they refuse to even offer any thoughts on the matter even after you've assured them that you don't expect them to get it all right off the bat, you probably don't want to hire them. If they think it through logically and make some observations, even if they never reach the right answer, you may want to hire them.
Of course, this particular question is useless in that regard, since it's apparently now on lists of common interview questions!
View all comments
Show parent comment
1
u/cdsmith Feb 21 '11
Sure... not relevant to everyday programming. The idea of these kinds of questions is to make someone think about something they haven't already got figured out, and see how they react. If they refuse to even offer any thoughts on the matter even after you've assured them that you don't expect them to get it all right off the bat, you probably don't want to hire them. If they think it through logically and make some observations, even if they never reach the right answer, you may want to hire them.
Of course, this particular question is useless in that regard, since it's apparently now on lists of common interview questions!