You have two water bottles both empty, one with the capacity to hold 11 liters of water and the other 6 liters and an endless supply of water. What is the minimum number of moves required to get 9 liters?

**Details and assumptions**:

Filling a bottle, emptying a filled bottle and transferring water from one bottle to another counts as a move.

You have to transfer as many liters as you can from a filled bottle to another empty or partially filled bottle. For example, if the 11 liters bottle has 7 liters of water and the 6 liters bottle has 3 liters already filled, if you want to transfer water from the 11 liters bottle to the 6 liters bottle, the 11 liters bottle will have 4 liters and the 6 liters bottle will have 6 liters.

While filling the bottle, you have to fill it to the bottle's maximum capacity.

×

Problem Loading...

Note Loading...

Set Loading...