Placement Assistance Question:
Download Job Interview Questions and Answers PDF
How to measure 4 liters of water using a 3 liter and a 5 liter jug?
Answer:
1. Make sure both jugs are empty.
2. Fill the 3 liter jug to the top.
3. Pour the contents of the 3 liter jug into the 5 liter jug.
4. Fill the 3 liter jug to the top.
5. Pour the contents of the 3 liter jug into the 5 liter jug until the 5 liter jug is full (i.e. contains exactly 5 liters of water.)
6. There should now be exactly 1 liter remaining in the 3 liter jug.
7. Empty the contents of the 5 liter jug and then pour the contents of the 1 liter jug into the 5 liter jug.
8. Now fill the 3 liter jug to the top. You now have 4 liters of water (1 liter in the 5 liter jug and 3 liters in the 3 liter jug).
2. Fill the 3 liter jug to the top.
3. Pour the contents of the 3 liter jug into the 5 liter jug.
4. Fill the 3 liter jug to the top.
5. Pour the contents of the 3 liter jug into the 5 liter jug until the 5 liter jug is full (i.e. contains exactly 5 liters of water.)
6. There should now be exactly 1 liter remaining in the 3 liter jug.
7. Empty the contents of the 5 liter jug and then pour the contents of the 1 liter jug into the 5 liter jug.
8. Now fill the 3 liter jug to the top. You now have 4 liters of water (1 liter in the 5 liter jug and 3 liters in the 3 liter jug).
Download Placement Assistance Interview Questions And Answers
PDF
Previous Question | Next Question |
Accenture .NET Technical Interview Questions: | Explain Overloading? |