VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-label-the-fruit-boxes/

⇱ Puzzle | Label The Fruit Boxes - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle | Label The Fruit Boxes

Last Updated : 13 Aug, 2025

There are three boxes, one contains only apples, one contains only oranges, and one contains both apples and oranges. The boxes have been incorrectly labeled such that no label identifies the actual contents of the box it labels. Opening just one box, and without looking in the box, you take out one piece of fruit. By looking at the fruit, how can you immediately label all of the boxes correctly?

👁 Image
Fruits Puzzle

Solution:

Here's how you can approach it step by step:

  1. Pick a fruit from the box labeled "Apples and Oranges". Since the label is incorrect, this box must contain only one type of fruit—either only apples or only oranges.
  2. If you draw an apple:
    • This box must contain only apples, so it is the "Apples" box.
    • The box labeled "Oranges" can’t be just oranges, so it must contain both apples and oranges.
    • The box labeled "Apples" must contain only oranges, since the labels are wrong.
  3. If you draw an orange:
    • This box must contain only oranges, so it is the "Oranges" box.
    • The box labeled "Apples" can’t contain just apples, so it must contain both apples and oranges.
    • The box labeled "Oranges" must contain only apples.

In either case, after drawing just one fruit, you can correctly label all three boxes!

Comment
Article Tags: