#391
Three and Five Make Four
Also asked as: The water jug problem · measure 4 litres with a 3 and 5 litre jug · the Die Hard jug puzzle
One of the classic quant interview questions, free to read in full.
MediumBrainteasers & Logic
Problem
You have a 3-liter jug, a 5-liter jug, an unlimited tap, and a drain. Legal moves: fill a jug, empty a jug, or pour one into the other until the source is empty or the target is full. Produce exactly 4 liters in a jug, in the minimum number of moves.
Your answer
Accepts decimals, fractions (5/12), and percentages (25%).