Re:Google interview questions - fun brain teasers
by jcl on Tuesday August 05, 2008 @12:59PM
(#267617)
By the same token, the pirate question in the article is worded incorrectly for its proposed solution.
If, as the problem is usually posed, all pirates get to vote on a division of loot, then the lead pirate can indeed get away with the hinted 98 coins.
But the article says that "the other pirates get to vote on his plan and if fewer than half agree with him...", implying that the lead pirate does not get to vote. The solution requires different logic -- I think the best the lead pirate can do in this case is 97 coins.
If you remove the condition that one of the balls is heavier and just say that one of the balls weighs differently, instead of slightly more, you can no longer solve it in 2 weightings.
In an interview, you can follow up the listed question with this one to see the response.