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 |
explain defference between structure and class with example
In c++ there is only virtual destructors, no constructors. Why?
What is sub classing in c++?
Prepare me a program for the animation of train
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort
What is the difference between and interface and an abstract class ?
4 Answers IBM, Infosys, Ness Technologies,
When is a memory allocated to a class?
explain dynamic binding by drowing
What is difference between function overloading and overriding?
what is virtual function in c++
What do you mean by variable?
What is the difference between pass by value,pass by pointer,pass by reference in the catch block in the exception handling in c++