- Write a program to solve the following problem using Golang:
-
- You have two jugs, a 4-gallon and a 3-gallon. Neither of the jugs has markings on them. There is a pump that can be used to fill the jugs with water. How can you get exactly two gallons of water in the 4 gallon jug?
-
- Generalise the problem above so that the parameters to your solution include the sizes of each jug and the final amount of water to be left in the larger jug.
https://runestone.academy/runestone/books/published/pythonds/Graphs/toctree.html