| |
GeekInterview.com > Placement Papers > Infosys > Analytical
| Print | |
Question: Moving Colour Balls
Answer: You have a basket of 1000 balls with 3 different colors with equal amount (assuming they will in equal amount). In how many moves you will get the balls of all colors like one red one green one blue, that it will sure you have all colors balls, then in how many attempts you will find that triplet.
|
| March 03, 2009 10:09:13 |
#3 |
| azhar.mehmud |
Member Since: March 2009 Total Comments: 2 |
RE: Moving Colour Balls |
You first pull out the ball let it be Red Now there may be a chance that balls you are pulling out are all same red colours, this will take 333 moves, than you will get next colour, let it be green, now the same can happen with the green balls so it will take at max more 333 moves to get to the next colour, so you will have a total of 2*333 moves in worst scenario. |
| |
Back To Question | |