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?
Answers were Sorted based on User's Feedback
First of all fill 3litre jar fullyand then pour it into
5litre jar.Now again fill 3litre jar fully and pour it into
5litre jarNow 5litre jar is full and 3litre jar has 1litre
water. Now pour all the water of 5litre jar on the ground
and pour the 3litre's jar 1 litre into 5 litre jar. Now
again fill 3litre jar fully and pour into 5litre jar .Now
5litre jar has 4litre water.
You can simply understand as:-
1)3l jar=3,5l jar=0
2)3l jar=0,5l jar=3
3)3l jar=3,5l jar=3
4)3l jar=1,5l jar=5
5)3l jar=1,5l jar=0
6)3l jar=0,5l jar=1
7)3l jar=3,5l jar=1
8)3l jar=0,5l jar=4
Is This Answer Correct ? | 29 Yes | 1 No |
Answer / udd
1)3l jar=0,5l jar=5
2)3l jar=3,5l jar=2
3)3l jar=0,5l jar=2
4)3l jar=2,5l jar=0
5)3l jar=2,5l jar=5
6)3l jar=3,5l jar=4
Express your answer clearly ...Mr.answ2
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / arun kumar yadav
fill 3 liter jar and put it in 5 liter jar two times then 1 liter left in 3 liter jar
empty 5 liter jar and put left of 3 liter jar and again fill 3liter jar and put it in 5 liter jar
now 5 liter jar contain 4 liter
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / 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 |
Are polymorphisms mutations?
When is an object created and what is its lifetime?
what is difference between class template and template class?
polymorphism means?
for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)
ambiguity regulation of multiple inheritance with example.
design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }
explain sub-type and sub class? atleast u have differ it into 4 points?
Why do we use oops?
What is the difference between a constructor and a destructor?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What is a friend function & its advantage?