Old Milk Problem:
This is the old milk problem where almost most of them know. Yet these kinds of questions are asked in Interviews in slightly modified form. So, just know the method and the idea.
Question:
You have 3 gallons and 5 gallons measuring Jar. How will you measure 4 gallons of Milk?
Answer:
There are two methods to solve this
- Pour Milk in 3 gallon first and from the 3 gallon jar pour into 5 gallon.
Repeat the same so that 1 gallon remains in 3 gallon. Now, take it aside to the new vessel and pour from 3 gallons to make 1 + 3 = 4 Gallons
- Pour Milk in 5 gallon first and from that 5 gallon pour into 3 gallon, so 2-gallon milk remains in the 5 gallon jar. Take it to new vessel. Repeat the same. 2 + 2= 4 gallons
No comments:
Post a Comment