The Hardest Interview Puzzle Question Ever

I hate puzzle questions too. At one point it became fashionable where I worked to post puzzles on the noticeboards outside your office. For awhile mine was:

e = 3
n = 343285878569830523580893306575740679545716377525420211495576158140025012622859413021647155097925923099079654737612551765675135751782966645477917450112996148903046399471329621073404375189573596145890193897131117904297828564750320319869151402870808599048010941214722131794764777262241425485454033215718530614228813758504306332175182979866223717215916077166925474873898665494945011465406284336639379003976926567214638530673609657120918076383271664162748888007869256029022847210403172118608204190004229661711963779213375751149595015660496318629472654736425230817703675159067350235072835405670403867435136222247715891504953098444893330963408780769325993978054193414473774418426312986080998886874132604721569516239658645730216315981931951673538129741677294786724229246543668009806769282382806899640048243540370141631496589794092432378969070697794223625082216889573837986230015937764716512289357860158816175578297352334460428151262720373431465319777741603199066554187639792933441952154134189948544473456738316249934191318148092777710386387734317720754565453220777092120190516609628049092636019759882816133231666365286193266863360627356763035447762803504507772355471058595487027908143562401451718062464362679456127531813407833033625423278394497538243720583531147711992606381334677687969597030983391307710987

What is p and q?

(Oh, and I doctored other people’s puzzles to make them unsolveable. At least mine’s solveable).

… and I’ve just messed up the formatting on Jeff’s page (sorry :-). In compensation I’ll give my response to the Moving Mt.Fuji question, which is (a) how far do you want to move it, (b) how quickly do you want it moved, and © how much lithium-6 deuteride can I use in the process?

Agree completely about how useful this style of interview question is. I can sort of see why they might be considered useful in allowing candidates to demonstrate their reasoning skills, but it must surely be much more relevant to give them an actual computing problem. Showing a spec and asking how to go about implementing it would demonstrate the same skill sets in a way that would be far more revealing.

But I donít agree with the 10 minute talk either. Even if you consider communication skills to be the most important trait of a programmer, surely the interview itself will tell you all you need to know about the candidateís relevant ability. A presentation is an entirely different type of communication, and one most programmers do not need.

I hate guessing questions. As a military officer I was trained to never guess. In one of the briefings I was present at, one of the officers asked a bunch of us cadets how deep we thought a stream was in the middle of the map. He listened to a half dozen people and then had us vote on how deep we thought the stream was. Everyone that had guessed a specific depth without any facts was then forced into a front leaning rest position and screamed at by a half dozen officers how they had just killed their entire unit because they f*ing guessed. Lessons like that stick.

They are good for engineering jobs.
The ‘trick’ ones about telling the color of your own hat or the two guards in front of doors are useless - everybody has heard them.

But the how much does Mt Fuji weigh questions are good. I expect a civil engineer to be able to estimate rock mass and I expect a software engineer to be able to estimate I/O rates or how many clients a server can handle

Until we are allowed to give candidates IQ tests they are the best / only way we have to form an estimate of how smart people are

My question is do you really think an IQ test would realy show how a person thinks, or how qualified they are for a position.

I think asking questions that are related to the scope of work would give you a better indicator to what skills they have to do the job.

I agree that comunications skills are very important when you hire architect

The answer is Blue. NO! Yellow.

I have a genius-level IQ and I hate with a passion stupid interview questions of the type that Jeff is mocking.

They don’t get you anyone except those that are interested in mental masturbation, which is the type of people that they are also given by. But what they DON’T do is further the bottom line.

People that think these questions are good are exactly the type of people that spend weeks investigating a problem instead of just saying, Oh, well, Microsoft has a bug but we can work around it by adding a /table tag. And for everyone that just cringed when I said that, realize that your employer usually doesn’t care if your website validates as long as it works on the 2 latest versions of IE and Firefox. And he WOULD RATHER that you not spend $10000 of his money figuring out how Microsoft screwed up and making a blog posting about it. He would rather you rolled the website out yesterday so that he can make more money.

A few people (including Jeff) have it right. Computer knowledge is always changing, so why bother testing people on that? What you want to know is:

  1. Are they a good person and a good communicator?

No matter how smart or how good a coder someone is, if they are an island that can’t communicate, you will end up rewriting their code when they are gone and they will cause friction in the office, because people will always be wary of them and their motives because of the lack of communication (as Jeff pointed out regarding the nurses). Also, you don’t want harrassment lawsuits or theft, so try to make sure the person you are hiring has some morals.

  1. Can they learn?

This career is all about learning. There are new things coming out all the time. I was actually turned down in a job because I didn’t know something that was still in Beta in Visual Studio. That’s dumb. It’s not that I can’t learn the latest Microsoft technology, it’s that I haven’t been exposed to it yet because it hasn’t even come out yet. I’ve been busy adding value to my employer with solutions that work and are maintainable, not bleeding edge beta stuff that isn’t even licensed for production code yet.

  1. Past success is absolutely an indicator of future success

Make sure that the person can describe successes and failures in detail. Make sure they know WHY they failed and what steps they have taken since to prevent a reoccurrance. That goes back to learning. Also, listen to how passionate they were about their successes and make sure to find ones where they were involved.

For a technical question, stick to a broad topic not a specific command line option. Command line options can be looked up in 1 minute. Instead, ask them to describe the dangers of SQL Injection and how to avoid it or some other topic that good developers absolutely should know.

And ultimately, hire them on a trial basis of at least 30 days. If they aren’t working out (for instance, a person with a Masters in programming asking what comma-delimited is), don’t be afraid to let them go quickly, before they waste too much of your company’s money.

And before you assume that I don’t know what I am talking about, I helped hire most of the best people for a consulting company that has survived multiple recessions and wrote award-winning websites for the nationally-known industry leader in a certain vertical.

And we never used puzzle/IQ questions to do it.

I am a full-time programmer and I find most people who aren’t programmers have a tough time communicating with programmers. I’m not a sociable person, but I communicate just fine. Programmers actually tend to be highly effective communicators… to the degree that talking is usually the worst medium to communicate in.

Programming isn’t a social practice. It’s not a party where people hang out and get to know eachother. That’s for college kids and sales people. Programming is a technical field and the best programmers want to be taken seriously as engineers, scientists, and craftspeople. This generally requires a lot of mental effort and discipline in maintaining mental focus.

I find that just employing a few rules and systems to manage communications is the best policy. It lets the technical people work without distractions and it lets non-technical people work with them without having to deal with their eccentricities.

For example, in my work place as policy I make sure that all technical issues are handled by our issue tracker. Nobody is allowed to walk up to my desk or anyone elses and discuss technical issues in face-to-face conversation. Firstly, it’s distracting to have someone approach you and force you away from your thought processes on a whim. Second, technical issues are difficult to communicate in person either by misunderstanding or by failure to transcribe every nuanced or implied detail. By using an issue tracker we avoid as many of those problems as possible. The programmers stay happy and the sales/biz people stay happy.

It’s a pain for people to get used to (especially the non-technical people), but things work more like a well-greased machine than a series of fumbles and kitchen fires. It’s a middle-ground solution that keeps things moving.

Don’t expect programmers to be sociable people. Just lay down a good system and a few rules and things will just happen regardless of anyone’s social skills.

I have a retard-level IQ and I love with a passion clever interview questions of the type that Jeff is mocking.

Heres one.

You are in an unlit room and placed in front of you are 100 coins. 40 is A side up and 60 is B side up(this is known to you). How can you split the 100 coins into two piles with equal amount of A side up?

allowed actions:

  1. picking coins
  2. flipping coins

Correct answer is:

Pick out 40 coins and flip them(turn coin upside down).

You probably not smart enough to arrive at that simply shit, so just follow my previous advice!

I interviewed at (and subsequently got an offer from) Microsoft last year and did not have to answer one puzzle question. YMMV.

Congratulation on your new child!!!

Reading some of the comments here, Iím starting to think these questions may have a use in screening. Anyone who reacts like some here to a problem they donít like is probably not going to have the maturity to handle the problems they are likely to encounter in the company.

About the prisoner/pirate/monkey puzzle; what is the puzzle? there is no actual question in there. Anywhooo… I guess my answer would be between -1 and the size of the collection of (non inclusive)

Solutionman, I think you should start writing articles…
But, what jeff says is true and false…
This article isnt going to convince people from not asking the puzzle questions…
becoz some how everyone thinks that those who can solve puzzles can code…

Really? I’m sorry you feel that way. I think presentation is a terrible way to interview programmers. Communication and Lexical skill while both desirable traits are sometimes mutually exclusive. In fact, I get terribly nervous around presentations, but that doesn’t mean I don’t have passion for my work. I always document my code well, and always have an eye out to be sure my programs are efficient and readable. My management reviews are always terrific. I just dislike presentation. shrug
Except if you used that as your pitch in an interview, you’d be very likely to succeed. It’s clear, concise, and tells them what you consider important in your work. It’s great presentation. Maybe you’re bettter than you think?

I’ve never interviewed anyone, but I always thought it would be good to ask the person to play Minesweeper on intermediate mode. Tell them that you only want them to make moves that they are certain about - if they can correctly state that there are no certain moves remaining, that would be considered winning. I think it would work well even if they have never played, to see them absorb a small set of rules.

I have watched many people play minesweeper and you often see people completely guessing, but also people who know a a few tactics, but that would rather guess than work through 5 or 6 squares to get to a square you can be certain about. It shows if a person is comfortable think with all their register variables active.

I’d like to think I’d have the balls to say if you can explain the relevance of that question, sure, I’ll have a go at it.