VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-15-camel-and-banana-puzzle/

⇱ Puzzle | Camel and Banana Puzzle - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle | Camel and Banana Puzzle

Last Updated : 10 Apr, 2026

A person owns a banana plantation and needs to transport 3000 bananas to a market located 1000 km away. The only available means of transportation is a camel.

The camel has the following limitations:

  • It can carry a maximum of 1000 bananas at a time.
  • It consumes 1 banana per kilometre travelled.

The camel may make multiple trips and can store bananas at intermediate points.

Determine the maximum number of bananas that can be delivered to the market.

👁 camel_and_banana_puzzle

Check if you were right - full answer with solution below.

Approach

To minimise the loss of bananas, the journey is divided into three stages: P1, P2, and P3. At each stage, bananas are transported in parts, and the number of trips determines how many bananas are consumed per kilometre.

👁 camel_and_banana_puzzle

The diagram above shows how the number of bananas reduces from 3000 to 2000 to 1000 across the three stages before reaching the destination.

Solution

Step 1: From 3000 to 2000 Bananas

The camel must transport 3000 bananas, but it can carry only 1000 at a time. Therefore, 3 trips are required.

For each kilometre:

  • Two trips involve moving forward and returning, consuming 2 bananas each
  • One trip involves only moving forward, consuming 1 banana

Total consumption = 5 bananas per kilometer

3000 − 5x = 2000
x = 200 km

After this stage:

  • Distance covered = 200 km
  • Bananas remaining = 2000

Step 2: From 2000 to 1000 Bananas

Now, 2 trips are required.

For each kilometre:

  • One trip involves moving forward and returning, consuming 2 bananas
  • One trip involves only moving forward, consuming 1 banana

Total consumption = 3 bananas per kilometer

2000 − 3y = 1000
y = 333.33 km

After this stage:

  • Total distance covered = 533.33 km
  • Bananas remaining = 1000

Step 3: Final Stage

At this stage, the camel carries 1000 bananas in a single trip.

Remaining distance:
1000 − 533.33 = 466.67 km

Bananas consumed:
466.67

Bananas remaining at destination:
1000 − 466.67 = 533.33

The maximum number of bananas that can reach the destination is approximately 533 bananas.

Comment
Article Tags: