Interview Question: What do they want to achieve?

Today I was at a technical interview, and it's time to give me some programming exercises. Finally I 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 way of thinking, I urge 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, read

At first I spent 5 minutes looking for a template on which I could not find it. I began to feel stupid. Remember, the guy was looking at me, waiting for an answer. I felt stupid.
So they gave me the key. 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

Five more minutes, and I still do not understand what the last number is. He gave the final key, which allowed me to solve it, and that was Think of the numbers as replacment for some sort of Alphabet .

Now I urge you to answer this question, but I also want to ask people why he would even ask such a question? What does this have to do with programming and what does he do from seeing me, using 20 minutes in desperate agony, pondering?

+49
language-agnostic arrays numbers ascii
Sep 06 '10 at 18:18
source share
23 answers

First, the answer: 116 is the decimal form of the letters ASCII "this matches", so the next letter is "t".

But, when I understood (considering your prompts) the template, I would make a few comments:

  • Presumably, he was trying to understand how you attacked a complex, even foggy problem.
  • If he really sat silently for 5 minutes at a time, then he needs to work on his type of interview, at least in order to encourage you to talk .

That said:

  • Did you think out loud and talk through the different approaches you used?
  • Have you asked questions about a problem area?

By the way, I incorrectly remembered "a" as 96, not 97, so I would have missed the problem. But I would talk all the time.

You must convey your thought processes, not just come up with an answer. I twice asked the interviewers problems that they did not expect from me, as with the intention to see my approach to solving them.

(By the way, I received suggestions from both interviews because I went my way through the problems - although I could not finish solving them.)

+36
Sep 06 '10 at 18:32
source share

Anyone who writes ascii values ​​in decimal is insane. The sequence would look much more familiar if it were in hexadecimal form.

+28
06 Sep '10 at 18:27
source share

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

alt text

+22
Sep 06 '10 at 23:01
source share

I have autism. Oddly enough, after the first glance I was told that this is not a numerical drawing, the next thing I noticed was the 32nd that I know, these are spaces. From there I got it / pretty quickly (less than a minute). This is pretty quick to check, because the IH and ST codes are consistent, I did not know the ascii code for any of them, but as soon as I confirmed the IS span, I knew that I was on the right track.

Then RR is fast - one character below S.

So - yes, I got it almost immediately. But, as I said, I have autism. There, the bucket loads normal material, which I can’t do, but matching patterns is what I do obsessively. I suspect that it would be useless in an interview.

I know this looks like a scary question because it tests your code / template violation skills and not your problem-solving skills, but I suspect this is not an intention.

When I hired people, I used a similar exercise, in which I used a pack of cards with colored figures and demanded that people sort the cards into heaps, and based on my “fit” did not answer “answers” ​​- work out the rules of the game.

The purpose of the exercise was not to test your pattern search skills, but to feel their emotional response to the experience of trying to solve a complex problem in which they will mostly encounter dead ends. In my card games, cards were always presented in an order that would make the other person think that they decided it, only to find that they were not, three times.

For the complex role of R&D, you want to hire people for whom a more complex problem space becomes more interested and excited about how they feel. For a less complex role, you want someone who would prefer the problem space to be stable - for example, someone wrote queries for a large database where we don’t want to change the system at all.

This is really a pretty useful sorting exercise to match candidates to roles.

+19
Sep 06 '10 at 20:39
source share

So, it took me a little, and I don’t need hints, but the correct answer is 116. For me, the giveaway was not so much the 32nd as the repetition of numbers in the pattern. There was no clear mathematical logic, but something else about the template clicked for me, and I just got it.

Once, a long time ago, I managed to hack a game (Koronis Rift for those who care, and I never downloaded it to BBS). I didn’t crack it because I wanted to copy it. This was due to the fact that he saved the games on the same drive as the game, and it really bothered me. As soon as I cracked it, I was very proud of myself, because copy protection did something quite complicated. So I wanted to put my mark on the boot screen.

Now I did not know where the loading screen was. I used the disassembler to start the boot material, but never reached the loading location of the screen. But I looked at the disk a lot, and there was a sequence of bytes that looked like raw data for an image. I knew how big the picture was if it were raw data, so I found the beginning and end of the sequence, put it in a file, and uploaded the file to the image editor. I was right.

Someone asked me: "How did you know that it was a photograph?" And I could not explain. He just looked like one.

This is not the talent / skill that I would expect from a good programmer. And I find answers to questions that are directly intended for the candidate, so that they are not really furious.

Yes, there is something about how to solve the candidate’s problem. But if I am going to test this, I am going to at least come up with a toy problem related to the work that I want the candidate to do.

The only way I would ever ask this question was if I were looking for a reverse engineer or cryptograph. Being able to notice such patterns and make good guesses as to what they mean will be a very valuable skill for these two roles. But not for the general programmer.

I think some interviewers have some sadism. A certain joy that the candidate wriggles. They can talk about finding the ability to solve the candidate’s problem, but I think that they really just look for a sensation (not necessarily relevance) smarter than the candidate.

+17
Sep 06 '10 at 18:40
source share

Well, I think I have an answer, and I got it pretty quickly - albeit with the help of a piece of reference material.

In an interview, this sounds a little waste of time. Of course I won’t ask. I agree that probably only the "programmer" will program, but he does not indicate anything significant regarding the skills of this programmer.

+11
Sep 06 '10 at 18:22
source share

Is the next number 116?

However, "Shir ir correct" also makes no sense.

Edit:

Unfortunately,

+7
Sep 06 '10 at 18:28
source share

I saw 32 and immediately clicked on me.

It can be argued that the crux of the matter is to see how you are groping your way around a seemingly insurmountable obstacle. Have you started to accept the final differences, looking for an arithmetic or polynomial sequence? Or did you just feel a little, and then shrug and give up?

Another scary question, in my opinion.

+4
Sep 06 '10 at 18:24
source share

ASCII -> int? The interviewer is crazy ...

It should be 116.

Translation: this is correc

t is absent. t is 116 in the ascii table.

http://www.cs.utk.edu/~pham/ascii.html

+3
Sep 06 '10 at 18:21
source share

Python:

 >>> ''.join(map(lambda x:chr(int(x)),'116 104 105 115 32 105 115 32 99 111 114 114 101 99'.split())) 'this is correc' 

The numbers look like ASCII codes. This is definitely not what I would ask in an interview, although since I do not expect anyone to recognize ASCII decimal in an interview. Hex is a little different (you can expect people to know that% 20 is a space), but still.

+3
Sep 06 '10 at 18:25
source share

Its ascii codes. The next letter is t . You may need to know ascii codes to work, as well as the ability to detect patterns.

+2
Sep 06 '10 at 18:23
source share

I assume this will help you solve the problem.

If you quickly figured it out (I suspect that 32 will be handed out to those who have absorbed some ASCII codes), you probably have another similar type - and so on - until you find yourself out of your comfort zone.

As an interlocutor, these questions can be a way of discovering that work is not for you!

+2
Sep 06 '10 at 18:26
source share

This is ASCII code, the solution is "t" (116). However, we must pay attention to his help, because he probably planned them.

“This is not a mathematical question.” Of course, we must interpret the numbers as characters and find a number that can be used to fill in the empty character, so at the end of the task you could tell him that it is very mathematical, because you had to fill out the template using the function .

“Consistency is important.” Yes, 32 helps you understand what he says about the characters.

"He believed that only programmers would understand this." Some non-programmers also understand this, but mostly programmers understand it. He tried to point out that you might come across these numbers when working on program codes / debugging.

"Think of numbers as a substitute for a kind of alphabet." I'm sure you knew the answer now.

He wanted to test your ingenuity and willpower. I met such questions in IQ tests (OK, in IQ tests they did not attract ASCII characters, because most people did not hear about ASCII).

EDIT:

Of course, this question was planned in advance, all the clues were additional clues, and they were interested in how much time and how many clues would be required to decipher the sequence. However, this is a mathematical question.

+2
Sep 06 '10 at 20:53 on
source share

The next number is 116.

This is a simple set of ASCII numbers behind the line "this matches." I asked a little, and the hint was in the range of numbers and in the fact that 32 appears (space).

Do you need to know the ASCII table by heart? This does not make sense to me as a question for an interview - perhaps he wanted you to identify it as an ASCII sequence.

+1
Sep 06 '10 at 18:24
source share

Thanks for the help with the alphabet - this is ASCII code:

 numbers = [116,104,105,115,32,105,115,32,99,111,114,114,101,99] for n in numbers: print "%c"%n, 

gives:

 thisiscorrec 

but without access to a computer, I wouldn’t figure it out so quickly. And I would also spend quite uncomfortable five minutes ...

+1
Sep 06 '10 at 18:24
source share

You know, this reminds me of the lot of math / logic exams that I used in school, where I will work and work on it, and finally came to the answer they were looking for ... just to feel great a feeling of dissatisfaction, because the question really did not have the right answer at all . He simply had an answer, which obviously should have been right.

I know that this has nothing to do with what you ask - yes, as others have said, it is important that your thought process is when trying to solve a problem (and saying that you think out loud is likely to be the best strategy in this scenarios) - but, frankly, if I were you, even if / when I found out, I could not resist the temptation to say:

"Look, I realized that you probably want me to say 116, but why? Why should the line This is correc logically be in t ?"

I mean, think about it. The only question is, "What is the next issue?" right? No: "What is the next number, considering that the sequence forms the complete statement" or: "What is the next number, considering that these are all English words", or even: "What is the next number, considering that this is the last number"; it's just: "What's next?" It is so open that it cannot be doubted.

I wonder if the interviewer agreed with this logic or was simply angry. Probably the last one.

+1
Sep 06 '10 at 22:30
source share

FROM#:

 foreach(byte b = new byte[]{116,104,105,115,32,105,115,32,99,111,114,114,101,99}) Console.Write((char)b); 

Output:

 this is correc 

So the answer is: 116, for 't'.

+1
Sep 06 '10 at 22:37
source share

As encoders, we encounter WTF every day: uncompromising clients, APIs with the brain, our own code from last week ... It's just part of our industry. Knowing how well we respond to these situations is a very useful employment criterion that I think of. The question itself is much less important than how you came up with the answer and justify it.

+1
Sep 07 '10 at 3:52
source share

This is 116. I do not need your hints. Subconsciously, I think I noticed that all the numbers were in the range 97-122 (BBC Micro programming 20 years ago when I was a kid helped me remember ASCII codes for some reason!). I have not converted every letter to the head just now:

 >>> "".join(map(chr, [116, 104, 105, 115, 32, 105, 115, 32, 99, 111, 114, 114, 101, 99])) 'this is correc' 

I think the interviewer probably wanted to see how you think about the problems, and / or thought you might know ASCII codes as a programmer. But if it were for a senior Java developer position, I would have thought it would be more important to ask you. Say, for example, about data structures or algorithms.

If they really let it go on for 20 minutes, as you say, they did it, they spent a lot of time so that they could use the assessment of your development skills.

0
Sep 06 '10 at 21:09
source share

If the sequence were in hexadecimal form, I could read the characters at a glance at a speed of about 1-2 seconds. I know most of the uppercase alphabet at first glance in decimal, as well as all control characters (in terms of control-A-control-Z) and recognize 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 26, and 27 by function. I expect that part of the goal is to see if the applicant intuitively recognizes the character sequence as such. 32 is of great importance for ASCII.

0
Sep 07 2018-10-10T00:
source share

At first I went with a lot of errors when breaking the code, looking for pairs of numbers. It made me believe that it was just a substitution of numbers for characters in the alphabet. Some time ago I read several books on encryption in WW2, and some theories for breaking the code stuck in my head.

0
Sep 07 '10 at 4:17
source share

The char sequence looks like this: this is correction So, 1 on the left is t ... that is, its ascii value is 116

So the answer is 116

0
Sep 08 '10 at 12:00
source share

The correct answer is obviously 8 8 8 8 8 8 83 80 65 85 84 65 33.

0
Nov 15 '10 at 10:08
source share



All Articles