Interview Question, What do they want to accomplish?

I was on a technical job interview today, and it was time to give me some programming exercises. I finally came to the last question:

Given the numbers:

116 104 105 115 32 105 115 32 99 111 114 114 101 99 ?

What is the next number?

To really understand my mindset, I encourage you to stop reading, and really try to figure out what the next number is. Spend a few minutes, and if you still cannot figure it out, then read on

I first spent 5 minutes looking for a pattern, at which I didn't find any. I started to feel stupid. Mind you, the guy was staring at me, waiting for an answer. I felt kinda stupid.
So I was given a clue. This is not a mathematical question

I spent another 5 minutes, and he said The sequence is important.

Then another 5 minutes, and he said He believed only programmers would understand this

Still another 5 minutes and I had yet to understand what the last number was. He gave a final clue which allowed me to solve it, and it was Think of the numbers as replacment for some sort of Alphabet.

Now I encourage you to come up with the answer, however I also want to know from people, why would he even ask a question like this? What has this to do with programming, and what does he accomplish from seeing me using 20 minutes in desperate agony pondering?


Solution 1:

First the answer: 116 - it's the decimal form of the ASCII letters "this is correc" so the letter 't' comes next.

But, while I figured out (given your clues) the pattern, I'd make a few comments:

  • Presumably he was trying to see how you attacked a difficult, even nebulous problem.
  • If he truly sat silent for 5 minutes at a time, then he needs to work on his interviewing style, if only to encourage you to talk.

That said:

  • Did you think out loud and talk through the various approaches you used?
  • Did you ask probing questions about the problem domain?

Incidentally, I mis-remembered 'a' as 96 rather than 97, so I would have missed the problem. But I would have been talking the entire time.

You have to convey your thought processes and not just come up with an answer. I've twice had interviewers give me problems that they didn't expect me to solve, both with the intent of seeing my approach to solving them.

(Incidentally, I got offers from both interviews, because I talked my way through the problems - even though I couldn't finish solving them.)

Solution 2:

Anyone who writes down ascii values in decimal is insane. The sequence would look a lot more familiar if it were in hex.

Solution 3:

Your question reminded me of an ad campaign of EA some years ago:

alt text