An implementation of the Change-making problem.
The algorithm is implemented using flask web framework. Therefore, to test run the following:
python3 -m venv .venv
- create a virtual environment.source .venv/bin/activate
- activate the virtual environment created above.pip install --upgrade-strategy=eager --upgrade pip
- upgrade the defaultpip
package.pip install --upgrade-strategy=eager --upgrade flask
- installflask
web framework.FLASK_APP=app.py flask run --debug
- start flask development server (with autoreload).
Send a POST
request to the endpoint with the algorithm implementation:
curl -X POST --location 'http://127.0.0.1:5000' -H 'Content-Type: application/json' -d '{
"ignore_invalid_orders_in_response": false,
"permissible_increments": [0.5],
"client_orders": [11, 5.5, 7, 7],
"available_bag_sizes": [1, 2, 4]
}'