Member of technical staff interview questions shared by candidates
given 8 coins and one of them heavier than the others, how many weighings will be needed to find the odd one ?
two weighings are needed. separate into three groups (3,3,2) put three on each side of scale, if sides balance then place two remaining coins on either side of scale to see which is heavier. If sides don't balance, take two coins from the heavier side and put on the scale to see if one is heavier, if they balance, the one you took off is the heaviest.
One weighing. Place four coins in each pan. Take two off at a time until the scale balances. The heavier coin will be in the hand of the pan that ascends.
@Cigar lover ... no. once you put coins on the scale, that counts as a weighing, and every time you remove coins it counts as a weighing. this boils down to the 3-3-2 solution above. the first time you remove 2 and weight, you are weighing 3-3. at that point there are 3 possibilities still. the scale is even, or one or the other side is down. you have to do one more weighing from there.
See Interview Questions for Similar Jobs
- Senior Software Engineer
- Software Engineer
- Member of Technical Staff
- Software Development Engineer II
- Principal Member of Technical Staff
- Software Development Engineer
- Software Developer
- Staff Engineer
- Technical Lead
- Principal Software Engineer
- Senior Consultant
- Software Engineer III
- Staff Software Engineer
- Software Engineer IV
- Software Engineer II
- Product Manager