QA engineer interview questions shared by candidates
You have 9 marbles which are all the same weight, except for one which is slightly heavier than the others. You also have an old?style balance, which allows you to weigh two piles of marbles to see which one is heavier (or if they are of equal weight). What is the fewest number of weighings that you can make which will tell you which marble is the heavier one ?
The fewest number of weightings is 2. Divide 9 marbles in 3 groups of 3. Weight #1A: 3 in each side. If balance, Weigtht #2A:1 in each side. If balance then the non-weighting is the one, otherwise the heavy side is the one. Weight #1B: 3 in each side. If not balance, then the heavy one has a defect one Weight #2B: Same as in #2A
I disagree on the above, you can divide 9 marbles into three groups of: 4, 4 and 1. Then, weigh 4 and 4 together. If the balance is "balanced", it means the one left aside is the heaviest marble. So, you could accomplish the task in just one weighing, but the chances of that are pretty low. However, that is what the question asks, in my opinion.
As little as one, up to three. 4 and 4 on each side. If it is balanced, you found the heaviest one. If unbalanced, take the heavier group and divide it into 2 and 2, then 1 and 1.
See Interview Questions for Similar Jobs
- Software Engineer
- QA Engineer
- QA Analyst
- Software Developer
- Quality Engineer
- Quality Assurance
- Test Engineer
- Software Development Engineer
- Quality Assurance Analyst
- Business Analyst
- Software Test Engineer
- Java Developer