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
What is polymorphism oop?
What is encapsulation c#?
What does sksksk mean in text slang?
Why is there no multiple inheritance?
Plese get me a perfect C++ program for railway/airway reservation with all details.
What is multilevel inheritance in oop?
What are the types of abstraction?
Why do we use class?
What is polymorphism explain?
What is abstraction example?
What is an example of genetic polymorphism?
hi all..i want to know oops concepts clearly can any1 explain??
What is ambiguity in inheritance?
what is the sylabus for priliminaries?
What is overloading in oop?