Philips Electronics

  www.philips.com
Work in HR? Unlock Free Profile

Philips Electronics Software Engineer Interview Question (student candidate)

I interviewed in Bangalore (India) and was asked:
"There are 100 balls out of which 99 are of the same weight but one is heavier. In how many minimum attempts you can find the heavier ball?"
Tags: analytical, puzzle
Add Tags [?]
Answer

Part of a Software Engineer Interview Review - one of 73 Philips Electronics Interview Reviews

Answers & Comments

1
of 1
vote
5
- Mayank on Jun 23, 2012
0
of 0
votes
The obvious way is to break them up in two groups, and weigh those against each other. Choose the heavier group and repeat. If there is an odd number, add one ball from a previous weigh. Each side will contain the following in consecutive weighs : 50 , 25, 13, 7, 4, 2, 1. so 7 weighs in total.

A less obvious way would be to divide each group in to 3 groups. Weigh two against each other. If one is heavier choose that group and continue. If both sides are equal, then the heavier ball is in the group that wasn't weighed.
The largest group in each weigh in the WCS - 34, 12, 4, 2, 1 - so 5 weighs.
- Roman on Jul 18, 2012
0
of 0
votes
5
- Vinay on Aug 30, 2012
1
of 3
votes
Minimum would be 2 attempts....

So you have 100 balls and only 1 ball weighs different from the rest of the 99.

Split the 100 balls into two groups. One group with 49 balls and the other with 49 balls. Weight those two groups and we are assume that they will be balanced on a scale (also assuming you could use a scale too). This leaves 2 balls left that needs to be weighed and 1 out of those 2 balls is the heavier one.
- FooBar on Oct 30, 2012

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.