Qualcomm Interview Question: You have 2 buckets in a room ... | Glassdoor

Interview Question

QCT Modem Test Engineer Interview San Diego, CA

You have 2 buckets in a room and one bucket has 17 Red

  balls, 19 Green Balls, 21 Blue Balls, 23 Yellow Balls. You are blindfolded and you need to pick one ball at a time and put in the bucket#2. You should stop at a point where you are confident that the color of the ball you are putting in already exists in the bucket#2. When would you stop?

Interview Answer

9 Answers


Worst case - you stop at the 5th chance because after 4 different colored balls the 5th ball color has to repeat.
Best case - you stop at the 2nd chance because you get the same color ball after 1st.

Interview Candidate on Apr 13, 2012

This post has been removed.
Please see our Community Guidelines or Terms of Service for more information.


But what if all of the first 4 you pick are of the same color? Then the 5th may not be already in bucket 2.
Going by that logic, I feel you'll have to pick (23+21+19+1) = 64 balls in the worst case, where the first 23 you pick are all yellow, the next 21 are blue, next 19 are green and the last one is red. What do you guys think?

Gautam on Jun 24, 2012

Gautam, your answer would have been correct if the question would have been - "You should stop at a point where you are confident that 'all four' color balls you are putting in already exists in the bucket#2

Sam on Aug 16, 2012

I think 24 balls...The highest ones + 1

Radhika on Sep 20, 2012

I think 3 is the answer.

HanaAsha on Dec 19, 2012

64, by worst case

wenhao on Feb 28, 2013

After the 2nd ball

Anonymous on Feb 1, 2016

65th chance. In worst case, you may pick all all balls of same color one after another. And so you cannot confidently stop till 23+21+19+1 balls are picked. The ball you pick need not be essentially red, it may be any color and you can confidently stop picking balls.

Anonymous on Sep 9, 2016

Add Answers or Comments

To comment on this, Sign In or Sign Up.