Measure exactly 6 litres with a 9 and a 4 jug
Asked at Optiver, SIG
You are handed a 9-litre jug and a 4-litre jug, both completely unmarked. There is a tap that can fill either jug to the brim, a drain that can empty either jug, and you may pour one jug into the other until the source runs out or the target is full. You can never judge a level by eye.
Using only these moves, leave exactly 6 litres of water in one of the jugs.
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.