in reply to Re^3: Challenge: N Jugs Problem
in thread Challenge: N Jugs Problem

How many steps do you see?

According to the OP's definition, there are 6 steps in your program.

The last step is useless, though.

And how much water is consumed?

Consumed is ambiguous. The OP asked to minimize how much water is needed. Your program requires 14 units of water (2*Y).