why to waste too much of water??

Follow these:
/* Initially 3quart jug and 5quart jug are empty */
1. Fill 5 quart jug
/* Now 3quart jug is empty and 5quart jug is full */
2. Pour water from 5quart jug into empty 3quart jug.
/* Now 3quart jug is full and 5quart jug has 2quart remaining in it */
3. Now empty the 3quart jug.
/* Now 3quart jug is empty and 5quart jug has 2quart remaining in it
*/
4. Transfer all water from 5quart jug to 3 quart jug
/* Now 5quart jug is empty and 3quart jug has 2quart remaining in it
*/
5. Now again fill 5 quart jug.
/* Now 5quart jug is full and 3quart jug has 2quart remaining in it
*/
6. Pour water from 5quart jug to 3quart jug till it gets filled up.
/* Now 5quart jug has 4quarts ( which s wat we need :) ) and 3quart
jug is full (which is unnecessary) */




On Mar 2, 8:59 am, annarao kataru <kataruanna...@gmail.com> wrote:
> first take water with 3 quart jug and pour into the 5 quart jug ,in the same
> way once again do it , this time u left with one quart in 3 quart jug and 5
> quarts in 5 quart jug.pour out the water in 5 quart jug and shift the one
> quart from 3 quart jug to five quart jug.finally u take 3 quarts with 3
> quart jug and pour it in the 5 quart jug. now u r left with 4 quarts in five
> quart jug  .  kar naidu
>
>
>
>
>
>
>
> On Wed, Mar 2, 2011 at 1:47 AM, bittu <shashank7andr...@gmail.com> wrote:
> > You have a five quart jug and a three quart jug, and an unlimited
> > supply of water (but no measuring cups). How would you come up with
> > exactly four quarts of water?
>
> > NOTE: The jugs are oddly shaped, such that filling up exactly ‘half’
> > of the jug would be impossible.
>
> > Thanks & Regards
> > Shashank Mani
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to