There are 2 empty jars of 5 and 3 liters capacity. And a
river is flowing besides. I want to measure 4 liters of
wanter using these 2 jars. How do you do this?

Answer Posted / harminder

I think i got got bit more simpler solnn with lesser steps

1. Fill 5 ltr jar, pour it intoo 3 ltr till its full
2. Now 3 ltr jar is full n 5 ltr jar has 3 ltrs in it.
3. Empty 3 ltr jar, and pour 2 ltr in 3 ltr jar,, now 4 ltr has 3 ltrs in it and 5 ltr jar is empty
4. Fill 5 ltr jar and out of the 5ltr jar shift water in 3 ltr jar, since only 1 ltr can be tranferred into 3 ltr jar,,
the 5 ltr jar has 4 ltr water in it..

*Hell the interviewer must have seen "Die Hard Part 2 - With a Vengeance" the previous night

Is This Answer Correct ?    3 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism oop?

707


What is encapsulation c#?

696


What does sksksk mean in text slang?

1688


Why is there no multiple inheritance?

643


Plese get me a perfect C++ program for railway/airway reservation with all details.

3526






What is multilevel inheritance in oop?

643


What are the types of abstraction?

642


Why do we use class?

724


What is polymorphism explain?

801


What is abstraction example?

699


What is an example of genetic polymorphism?

753


hi all..i want to know oops concepts clearly can any1 explain??

1757


What is ambiguity in inheritance?

707


what is the sylabus for priliminaries?

1797


What is overloading in oop?

653