Hi John, I'll take a shot at being clever - just 'cos I've come out of a 2.5 hour meeting on a Friday afternoon in early January :D
First weigh two sets of three balls. If they balance then it's one of the other two balls and you can use the second weighing to determine which. If the two sets of three don't balance, then take any two balls from the heavier set of three and use your second weighing for those. If they balance, then the unweighed ball is the heavier. Otherwise, it's the one that weighed heaviest in that second weighing. Regards, Bevan On Fri 08/01/10 12:48 PM , "John Bird" [email protected] sent: > One of the famous Google interview questions > > 12. You Have Eight Balls All Of The Same Size. Seven Of Them Weigh > The Same, And One Of Them Weighs Slightly More. How Can You Find The > Ball That Is Heavier By Using A Balance And Only Two Weighings? > > Post answers here. [I figured one way - maybe there are more. Your > prize is smug satisfaction at being clever] John > _______________________________________________ NZ Borland Developers Group Offtopic mailing list Post: [email protected] Admin: http://delphi.org.nz/mailman/listinfo/offtopic Unsubscribe: send an email to [email protected] with Subject: unsubscribe
