The Hardest Interview Puzzle Question Ever

Have you ever been to an interview for a programming job where they asked you one of those interview puzzle questions? I have. The one I got was:


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2009/03/the-hardest-interview-puzzle-question-ever.html

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.

Doesn’t sound like a happy place. Of course when I started (late 60’s) people managed fine without so many technical appendages. We also had the common sense not to interrupt our fellow programmers when they were concentrating. There were people I worked for (CNO, members of the US House of Representatives) that would’ve told you what to do with your issue tracker on the way out the door.

Hey Solutionman,
You forgot to split the pile…

Guess you lose.

I love it when arrogance loses…

Reminds me of the famous interview question why are manhole covers round?. Aside from the obvious responses such as because it has to fit into a round hole, and so it has no sharp corners and becasue it’s easier to fit (does need much lining up) etc, there’s one REALLY good answer. Anyone know what it is?

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.

In my first real job, we had a co-worker that was kinda arogant in a church lady kinda way, inconsiderate of her coworkers, and yes, a lousy communicator. Everyone put up with her though because Michelle was just being Michelle. Likewise, I have a friend who occasionally invites me to play poker, but I no longer accept because he also invites another friend who is loud, boisterous, negative, and insulting as a rule of thumb. Again, everyone put up with it because that just who he is.

As someone who has always tried real hard to break out of the stereotypical molds that have been placed around me due to my decisions and circumstances, I always find it amazing how many people are willing to not only forgive but encourage socially inappropriate behavoir simply to perpetuate a stereotype.

so it won’t fall in the hole, like it could for other shapes.

1 Like

You’re hired.

Actually, rather than being polite and commenting on the article, I found myself distracted by liking the pirate/monkey problem. After taking it apart for a little while I think it’s possible to say it isn’t parody (as the link says) and find it solvable. The key, in my opinion, is to dispense with the chaos and recognize that the last statement defines (in a somewhat reverse order) what we may have solved (as preconditions) for us in the problems above. Not having some of the math makes it tricky (should I see significance in reversible primes?), but we’re allowed to state our assumptions, right? Assume enough away and it’s possible to frame anything.

For example, I might look at how one interprets the actual number of pirates per prisoner, which helps me answer why the rum’s gone. This is important to establish, with pirates. More seriously, may as well as recognize that some of the issues are independent (mass/liquid displacement to find poison and coin, river monkeys, and primes with an even leading digit can be separated), and rely on the final case statement to show that IF we assume the required conditions are met for, e.g., has everyone flipped the switch now, this resolves into what left as the actual puzzle. I.e., I don’t always need to know that the monkeys lie, just that it’s a precondition for part of another condition.

In the end, I became curious about who’s walking the plank. Since I don’t know if everyone’s a pirate, how many there are, and if this is part of a puzzle I haven’t seen, I came up with the need to knock everyone out (then we don’t care who’s prisoner/pirate/plankworthy) and effect the release. We’ll just solve what we can. Bribe the captors with the real coins, get each person catatonic on at least two bottles of that good, clean wine, wake up in the morgue, then (having already rigged the room switches for party strobe) give the party hats, fake coin, and bad wine to the primates…because there’s something not quite right about these monkeys and there are WAY too many of them trying to use our escape canoe.

mov loc, mntFuji; ?

I think maybe the reason interviewers like to ask these puzzle-type questions is because they can’t handle the technical stuff. :slight_smile:

Ouch! :slight_smile:

More useless dribble posted by Jeff.

@Glenn: Don’t fall for that so it doesn’t fall in thing. The answer is pseudo-anthropic principle. If they weren’t round, you wouldn’t be able to sensibly ask me that question. Therefore, they are round because they MUST be round in any universe in which you’re asking me that question. Big picture, man.

@Jeff: The surgeon is the patient’s mother.

Haven’t you blogged about this several times? Actually, I think there probably are about 4 topics you’ve been repeating a lot lately and they all seem to border along the lines of either anti-intellectualism or something about how programming is irrelevant and how all this other jibber jabber is the real fruit.

Dang! WaterCOOLER presentation - I misread that as waterCOLOUR presentation…which I think would be FAR more interesting!!!

Assuming a few points:

  • monkeys cannot operate a canoe
  • pirates lie

Then:

  • Pirates will make all the prisoners walk the plank, that is in their nature.
  • First 2 monkeys will sink the canoe, the rest will be angry.
  • Pirates will be stuck on the wrong side of the river, and eventually will die from either the poisoned wine or at the hands of the irate monkeys.
  • The monkeys will go off looking for bananas.
  • In time, the counterfeit coins will be worth something because they will be antique counterfeits, and probably rarer than the real thing.

The most profitable solution is to ignore the pirates, the prisoners and the monkeys, take a GPS position, collect the coins when it’s all over.

But I don’t want to work for anyone so preoccupied with pirates and monkeys.

A friend of mine who owns a consulting company gave me a great bit of advice about hiring for communication ability. Phone screen all candidates before ever meeting them in person. If they can’t communicate well over the phone, their resume goes in the trash.

I would lie and say my favorite soda is Moxie and assuming the state is California I would bullshit some really small number because Moxie isn’t availible on the west coast as far as I know.

Hmmm… searches what puzzle questions are

Having spent some time working in a hospital I remember being told (many times) the importance of communication and talking to patients (even though I actually interacted with patients only rarely), it’s not just the software world, communication is important in almost any career.