Sunday 29 May 2016

Mislabeled jar - Jelly Beans problem

This problem is also called Jelly Beans problem. This is the most commonly asked interview puzzle.

You have 3 jars that are all mislabeled.
One jar contains Apple, another contains Oranges and the third jar contains a mixture of both Apple and Oranges.
Labels on jars are as follows: Apples, Oranges, Apples+Oranges

You are allowed to pick as many fruits as you want from each jar to fix the labels on the jars.

What is the minimum number of fruits that you have to pick and from which jars to correctly label them?

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Answer:









No comments:

Post a Comment