+ 5
New Challenge đ„ đ„ {logic}
You were given three jugs of capacity 3litres, 4litres and 5litres. How can you fill to capacity, the 4ltrs Jug from the other two without an overflow? Note: You can fill any one of the two(to capacity), then pour into the other and you may pour the remnant inside the 4ltrs Jug or away but you must fill to capacity! ...you can fetch water from a well beside...
9 Answers
+ 1
Best answers âKRISHNAâ and âSALEKINâ
+ 12
1) Fill 3 litre jug
2) Pour those 3 litres in 5 litre jug
3) Fill 3 litre jug
4) Pour 2 litres in 5 litre jug, 1 litre in 4 litre jug
5) Fill 3 litre jug
6) Pour those 3 litres in 4 litre jug
+ 6
Salekin best answer
+ 4
fill 5 litres, pour on 3 litre jug, u have 2 litres remaining, pour it on the 4 litre jug. repeat twice lul
+ 3
I think you've a slight error, I think we're not supposed to have the 4L jug.
Only 3L and 5L
Because, if we have a 4L jug, we can cheat, like:
Step 1, Fill the 5L jug completely.
Step 2, Fill the 4L jug completely from the 5L jug.
The end...
But, Here's the actual answer ( if we didn't have a 4L jug, and either jugs didn't have any markings )
Step 1, Fill the 3L jug completely.
Step 2, Fill the 5L jug from the water from 3L Jug.
Step 3, Fill the 3L jug completely again, now fill the 5L jug from the water of 3L jug until it's filled completely.
Now, the 5L jug has 5L water, but the 3L jug has only 1L of water.
Step 4, Empty the 5L jug. Pour the 1L water you had from the 3L jug to the 5L jug.
So, the 5L jug has only 1L of water in it.
Step 5. Fill the 3L jug with water.
Step 6, Transfer the 3L water from the 3L jug to the 5L jug.
Voila, the the 5L jug should have 1+3 = 4L of water.
Final Step, Pour all the water in your 5L jug to the 4L jug you have, you wont overflow a single drop of water.
High five if you've first heard of the brain teaser in Die Hard 3
:)
+ 3
@Salekin, you're right they was no 4th jug but sololeaners don't tolerate hard questions so I just made it easy, never knew you and Krishna could get the real correct answer easily.
+ 2
@Salekin, if you can answer this question then you're really good at coding.
https://www.sololearn.com/discuss/504994/?ref=app
+ 1
1. Fill 5 litres jug with water.
2. Pour it into 3 litres jug.
3. Pour remaining 2 litres of water from 5 litres jug to the 4 litres jug.
4. Repeat the above 3 steps once more...
+ 1
@Nomeh Uchenna Gabriel, @$Vengat
Thanks, do post more challenges like this please :)