left side group1 right side group2
if both are unequal then you find out group of three which contains target , lets say it is group1.
Now from group left side one , right side one. If they are equal, then remaining one is less weight, otherwise you can see on balance.
caseII. Both are equal, then group3 contains target.
again from group left side one , right side one. If they are equal, then remaining one is less weight, otherwise you can see on balance
Campbell Ritchie wrote:This sounds like a puzzle question like "how do you weigh an elephant?" If you have seen it before, it is very easy. Such an interview is as much a test of memory as of intelligence.
It's actually a slightly different family of questions--of course most interviewers aren't competent enough to know the difference.
The weight question is a bounded math problem. You can mathematically express the question and the solution. Similar questions include a knight's tour, tiling problems, river crossing questions, etc.
The elephant question is open ended and tests your ability to work with unbounded problems requiring creativity to find a solution. Similar questions include moving a mountain, lightbulb questions, and to a lesser extent Feynman numbers.
Mark Herschberg, author of The Career Toolkit
I have recently been attending a few interviews and had faced such questions in a well know company.
I got the above mentioned question of finding a less wieghing defective ball from 16 balls. I knew the answer.
Another question was to find a date closest to the given date (lesser than given date) which when represented in a string is a palindrome. The given date was 10022001 (02 Oct 2001).When I started writing the logic to program it he told me to ifnd it manually. Even after 15 minutes and a couple of hints I did not get it
The interviewer was kind enough to explain me the answer and it was based on the logic ofelimination.
Fortunately, I managed to just clear it.
P.S : If anyone can provide me links to such questions I would like to try it out.
anarkali perera wrote:i went for an interview.they ask me there are 9 bolls and one boll's weight is lessthan other eight.And there is a balance also.He ask me to find the less weight boll using two times?
can anyone tell me reference to place find these type of analitical questions?
you can check out Barron GRE book 12th edition or 13th edition.
Mark Herschberg wrote:lightbulb questions, and to a lesser extent Feynman numbers.
I wouldn't know what a Feynman number is if it bit me in the ankle . . . but in this country "lightbulb questions" means silly riddles of the sort "How many Java programmers does it take to change a lightbulb?"
My, my, aren't you a big fella. Here, have a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss