Advertisements
Latest

[Brain Teaser] Measuring Water With Two Jugs

Question:

You are given two jugs – one fills up to exactly 3 liters and one fills up to exactly 5 liters. How can you fill the jug with exactly 4 liters of water?

 

Interview Questions

 

Answer:

Solution 1:

  1. Fill the 5-liter jug with water
  2. Pour as much of 5-liter jug into 3-liter jug such that you are left with 2 liters in the 5-liter jug
  3. Empty the 3-liter jug
  4. Pour the 2 liters of water from the 5-liter jug into the 3-liter jug
  5. Refill the 5-liter jug and pour as much as you can into the 3-liter jug which already has 2 liters of water in it – in doing so, you can empty 1 liter from the 5-liter jug which leaves you with 4 liters of water in the 5-liter jug

Solution 2:

  1. Fill the 3-liter jug with water
  2. Pour it into the 5-liter jug such that your 5-liter jug now has 3 liters of water
  3. Refill the 3-liter jug with water
  4. Pour as much of the 3-liter jug into the 5-liter jug which already has 3 liters of water – you are left with 1 liter of water in the 3-liter jug
  5. Empty the 5 liter jug
  6. Pour the 1 liter of water from the 3-liter jug into the 5-liter jug
  7. Refill the 3-liter jug
  8. Pour all of it into the 5-liter jug which already has 1 liter of water- you are left with 4 liters of water in the 5-liter jug
Image Source: relativelyinteresting.com
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s