Originally posted by kbaumenThe idea is to pour 3 gallons out of the 5 gallon jug, but to measure, you pour into the 3 gallon jug. Hence the next line, where the 3 gallons is dumped.
How can you dump exactly three? Your solution isn't very precise. Take a look above your post.
EDIT: Sorry, my mistake. I thought that your idea is to pour those 3 gallons out of the 5 gallon jug.