The Joel on Software Discussion Group (CLOSED)

A place to discuss Joel on Software. Now closed.

This community works best when people use their real names. Please register for a free account.

Other Groups:
Joel on Software
Business of Software
Design of Software (CLOSED)
.NET Questions (CLOSED)
TechInterview.org
CityDesk
FogBugz
Fog Creek Copilot


The Old Forum


Your hosts:
Albert D. Kallal
Li-Fan Chen
Stephen Jones

Wierdest interview question?

Anybody have any interesting trick or logic questions they were ever asked in an interview?  I'm sure most of us have heard of Microsoft's infamous "Why are manhole covers round?"

http://en.wikipedia.org/wiki/Manhole_cover#Why_are_they_round

Post your best trick/logic question you've been asked, or have asked, and be nice enough to give the answer below.
TravisO Send private email
Tuesday, April 24, 2007
 
 
This thread already has you covered:
http://www.sellsbrothers.com/fun/msiview/
PWills Send private email
Tuesday, April 24, 2007
 
 
I was asked "our entire system just went down and the sysadmin is snowboarding, can you fix it?"

It had really gone down, and I really did proceed to fix a file server.

Then I was asked "do you take a cheque?"

That was rewarding.
banjo
Tuesday, April 24, 2007
 
 
"How would you spell weirdest"?
OK, I'm a dork
Tuesday, April 24, 2007
 
 
In the left column of this very page and this entire site, there is a link to http://discuss.techinterview.org/?interview

Click on that link.
Meghraj Reddy
Tuesday, April 24, 2007
 
 
Of course most of the questions there now are homework questions.

Or the same Microsoft/Google question over and over.

Tuesday, April 24, 2007
 
 
You are given the deck of cards in the dark room.  All but 10 cards are face down.  Separate the deck in two so that the number of cards facing up is the same in both decks.
Jeff Zanooda Send private email
Tuesday, April 24, 2007
 
 
Take the top ten and flip them over.  Done.
Derek I
Tuesday, April 24, 2007
 
 
----"You are given the deck of cards in the dark room.  All but 10 cards are face down.  Separate the deck in two so that the number of cards facing up is the same in both decks."-----

Turn on the light first?
Stephen Jones Send private email
Tuesday, April 24, 2007
 
 
>>>
Take the top ten and flip them over.  Done.
>>>

How is this even close to a solution?

Does this even have a solution (besides turning on the light)?
Huh?
Tuesday, April 24, 2007
 
 
Split the deck into two stacks, and then turn each stack on edge, so both stacks have no cards that are face up. Or is this not a trick question?
28/w
Tuesday, April 24, 2007
 
 
Oh, how about this? Split the deck into n and 52-n stacks. Let the stack of n cards have m cards that are face up. The other stack must have 10 – m cards that are face up. If you flip over the 10 cards in the stack of n, then it has n-m cards that are face up. So let n = 10.
28/w
Tuesday, April 24, 2007
 
 
Doh. I totally failed to see that someone posted the solution before me :-)
28/w
Tuesday, April 24, 2007
 
 
I applied for a job doing Tech Support at Alexa.

I was interviewed by about 5 different people.

A developer there asked me, "When you turn on the hot water in a hotel bathroom, the water is already hot.  The water doesn't start out cold and then get hot like it does in your house.  Why?"
Alexa reject
Tuesday, April 24, 2007
 
 
Ok so the card question was too easy, let's try something more interesting then.

1. You have two normally distributed random variables, x1 and x2, with means m1 and m2 and standard deviations s1 and s2.  How do you calculate the probability that x1 > x2 ?

2. Now you have ten variables.  How do you calculate the probability that x1 is greater than the other nine?
Jeff Zanooda Send private email
Tuesday, April 24, 2007
 
 
Derek's solution is correct. This sometimes is in terms of coins being head or tails.
Scott
Tuesday, April 24, 2007
 
 
Alexa, there can be two reasons.

One is that at any position in the building there are many people using hot water, so the pipes are primed.

The other answer, and more likely the answer in the US, is that many commercial buildings have electrical inline water heating elements that are in each bathroom. These elements can often be less expensive to run than centralized water heaters, and of course you never run out of hot water.
Scott
Tuesday, April 24, 2007
 
 
Scott,

Here's the answer I gave Alexa:


"I think there are two possibilities:


1) The pipes are insulated, so the water doesn't get cold.


2) The water is re-circulated from the pipes back to the water heater so it doesn't stagnate and get cold."


I don't really know much about plumbing, so I don't know if either of my answers was correct.  The interviewer didn't indicate if I gave a correct answer or not.


Then he asked me a follow-up question, "Why would hotels make sure that the water is always hot straight from the tap?"


I said, "For convenience.  Hotels keep the water hot for the customers' convenience."


The interviewer didn't seem impressed by that answer either.


I've Googled this question and I've read that hotels might keep the water hot so that customers don't waste water by letting the tap run.


Honestly, I don't know what the answer to this question is, or how it was even remotely relevant to a Tech Support job.
Alexa reject
Tuesday, April 24, 2007
 
 
Alexa, my first thought was that the recirculating system you propose is obviously a bad answer since it should be obvious to anyone that you'd have to have an extra set of pipes, which would take up wall space, and be a really complicated, strange thing. It also might be illegal since most codes frown on any sort of reuse of water in a system due to the chance to pick up bacteria.

But the first google hit says that your answer is actually correct:

http://www.csemag.com/article/CA6434235.html

That IS how hotels keep the water hot.
Scott
Tuesday, April 24, 2007
 
 
Note also that the article explicitly states that the reason for such a system is 'convenience' of the customers.
Scott
Tuesday, April 24, 2007
 
 
"'Convenience' of the customers" is a synonym for "reputation of the hotel and resulting ability to charge more."  Wouldn't you prefer to stay in the hotel with a better hot water supply?

Also, you can get gas-powered hot water heaters that don't work by heating up a tank full of water - they give convenience and energy efficiency, as well as improved temperature control. I'm sure some hotels will be playing that game, too.

Tuesday, April 24, 2007
 
 
Here's a classic.

Two people are asked to collect data on the rate of acceleration of objects (i.e. 'g') at the Earth's surface. One has to stand under an apple tree, the other has to stand under a coconut tree. Which one will produce the bring you the most accurate data?
icarus Send private email
Wednesday, April 25, 2007
 
 
regarding the apple vs coconut problem...

I would think the apple would give more accurate results, as I think apples are generally smaller than coconuts, so less wind resistance.

On the other hand, the coconuts are more uniformly rounded, so that might make them better for calculating.

I would also think the hairiness of coconuts would cause more wind resistance, but I think a coconut has a thick outer shell that is smooth, though probably more like an orange than an apple.

I would go with apple - smooth, compact, traditional.
nathan Send private email
Wednesday, April 25, 2007
 
 
First, we assume they are going to measure gravity by using a ball with fixed mass in a vacuum tube to reduce the unknown factors.

Now, the tree produces some attractive gravitational force by account of having mass.  The exact force would depend on the mass distribution of the tree (the closer the mass to the experiment, the more effect it would have).  Guessing by shape, the apple tree would skew the results more.

But practically, the limitation of measuring tools will obscure this effect, rendering results with equal accuracy.

Wednesday, April 25, 2007
 
 
Can't....Resist...

Coconut tree will provide more useful results because of the combination of additional height (longer period of measure) and no branches to interfere with the fall. The only apples that fall unimpeded are so close to the ground as to be useless from a timing perspective unless your timing equipment is so good as to make me wonder why you aren't doing a real experiment.
Ron Porter Send private email
Wednesday, April 25, 2007
 
 
The apple tree, because a falling coconut will give you a concussion.
Derek I
Wednesday, April 25, 2007
 
 
Nathan, air resistance should have less effect on coconuts.  It's proportional to the cross section (square of the size), whereas mass is proportional to volume (cube of the size).  So the deceleration, which is force over mass, is less for bigger objects.
That's why dust takes more time to settle than, say, bricks.
Jeff Zanooda Send private email
Wednesday, April 25, 2007
 
 
>>>>>>
>>>
Take the top ten and flip them over.  Done.
>>>

How is this even close to a solution?
>>>>>>

Ohhhhh, I get it now.  I have a nasty habit of reading too much into a question.  The question states "All but 10 cards are face down".  So, for some reason, I was trying to solve this problem so that the two decks would have ONLY 10 cards face down (5 in each deck).

Jeesh.  That's why I wonder if these types of questions are relevant for job interviews.  Maybe.  Maybe it implies that my reading skills suck.
Huh?
Wednesday, April 25, 2007
 
 
Would the fact that the coconuts would be growing closer to the equator and the apples growing closer to the poles make a difference?  Near the equator, the earth bulges out and so the coconut tree at sea level would be farther from the center of the earth than an apple tree at sea level.
Peter
Wednesday, April 25, 2007
 
 
>> Near the equator, the earth bulges out

So you're implying the Earth is flat the closer you get to the poles?  Heh, it's equally round no matter where you're standing :P
TravisO Send private email
Thursday, April 26, 2007
 
 
"The apple tree, because a falling coconut will give you a concussion."

Derek has correctly identified the big picture issues here. There is technical and personal risk involved. People actually do die because coconuts fall on their heads. Apples don't kill people unless you choke on one or drink 50 pints of scrumpy.

Of course there is no correct answer, but it does highlight different modes of thinking and assumptions. As such it's one of those pesky trick questions which should come with a 'may patronise your candidate' warning.
icarus Send private email
Friday, April 27, 2007
 
 
The best answer I have heard for the "why are manhole covers round?" was "Because manholes are round, any other shape would be silly since it would not fit."

Tuesday, May 01, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz