Consultant interview questions shared by candidates
You have three pots, one has red marbles, one has green marbles and the other has a mixture of red and green marbles. Each pot has a label indicating what colour marbles the pot should contain. The labels are on the wrong pots. You can not see what is in each pot. By only putting your hand into one of the pots and taking out a marble, determine the least number of marbles you need to take out of any of the pots to determine which label should be on which pot. (This was the brain teaser not explained properly)
2 things you know for sure: 1. all the labels are wrong 2. the 'mixed' pot is the only one that definitely contains one colour only Therefore, pick one marble from the 'mixed' pot. If it is green, take the label from the 'green' pot, and stick it on, then take the mixed label off and stick it on the red pot, take the red label off and stick it on the original 'green' pot. (If it's red then vice versa.)
You don't need to pick the mixed pot, just pick any pot. Take one from any pot (1st pot) and read its color. Get the label of that color from the 2nd pot, and put the original label to the 3rd pot. Then put the label of the 3rd pot to the 2nd pot.
Total Pots = 3 , Total Colours = 2 ===> (combinations 3c2 = 3), so you need to take out at least 3 marbles in order to identify the correct labels