/TwoWaterJugProblem

Solve the two water jug puzzle in C++

Primary LanguageC++

Water pouring puzzle

Water pouring puzzles (also called water jug problems or measuring puzzles) are a class of puzzle involving a finite collection of water jugs of known integer capacities (in terms of a liquid measure such as liters or gallons). Initially each jug contains a known integer volume of liquid, not necessarily equal to its capacity. Puzzles of this type ask how many steps of pouring water from one jug to another (until either one jug becomes empty or the other becomes full) are needed to reach a goal state, specified in terms of the volume of liquid that must be present in some jug or jugs. Continue reading: https://en.wikipedia.org/wiki/Water_pouring_puzzle