BigRiddles
Fill 4 gallons (Micrisoft Interview)
posted by Srini - November 07 2013 11:52:03 AM
With unlimited water supply, You are give a jar with 5 gallon capacity and another jar with 3 gallon. By filling and emptying out water(Completely) through these jars, Make up for a 4 gallon of water.
Reply by chilidog - November 08 2013 04:15:37 PM
Fill the 3 jar. Pour the water in the 3 jar into the 5 jar. Do the same thing one more time. You will have 5 in the 5 jar and 1 in the 3 jar. Dump out all the water in the 5 jar. Put the 1 from the 3 jar into the 5 jar. Fill the 3 jar and put it into the 5 jar, to get 4 gallons

To post a response, simply log in with your Google Account.