Programming Question

Question: You have a five-quart jug, a three-quart jug, and an unlimited supply of water (but no measuring cups). How would you come up with exactly four quarts of water? Note that the jugs are oddly shaped, such that filling up exactly "half" of the jug would be impossible.

From: Cracking the Coding Interview [McDowell]

Subject: Math and Logic Puzzles

Load Another Question


Select a Subject