Change-making is a simple Dynamic Programming problem.
In order to run this program you need the python3 yaml library, which can be installed by running the following command:
pip3 install pyyaml
This approach is a BFS (Breadth First Search) on a Tree containing all the available combinations.
In order to run the program use git clone and then edit the following variables of the conf.yaml file:
change: 111
available_coins: [2, 5, 10, 20]
timer: Truechange: is the desired amount
available_coins: handles the coins that can be used in order to return the desired amount
timer: handles the code which prints the execution time of the program
You execute the program by typing the following command:
python3 main.pyTo install the pytest library run the following command:
pip3 install pytest
In order to run the tests, navigate to the tests folder and then run the following command:
pytest test_CoinClass.py -v
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.