pre-commit-ci[bot]
448f21964d
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-02-16 10:00:58 +00:00
Cfengsu2002
aa13153902
Update minimum_coin_change.py
...
The correct version with input and output explanation
2025-02-16 05:00:20 -05:00
pre-commit-ci[bot]
af72388b49
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-02-16 09:45:11 +00:00
Cfengsu2002
4526debc38
Update minimum_coin_change.py
2025-02-16 04:44:54 -05:00
Cfengsu2002
04732532f5
Update minimum_coin_change.py
2025-02-16 04:44:37 -05:00
pre-commit-ci[bot]
d4d24a610a
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-02-16 09:44:04 +00:00
Cfengsu2002
0bbf0ea76e
Update minimum_coin_change.py
...
Add some input and output examples on top
2025-02-16 04:43:41 -05:00
Cfengsu2002
d34b0866d5
Update minimum_coin_change.py
...
Finished and formatted
2025-02-16 04:36:25 -05:00
pre-commit-ci[bot]
8112c055eb
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-02-16 09:34:11 +00:00
Cfengsu2002
ec2723f296
Update minimum_coin_change.py
...
Change with format
2025-02-16 04:33:47 -05:00
pre-commit-ci[bot]
72868008ad
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-02-16 09:00:33 +00:00
Cfengsu2002
ff961fa04a
Update minimum_coin_change.py
...
Fix: Improve minimum coin change logic & add doctest
- Removed unnecessary int() conversions to improve efficiency.
- Updated function parameter type (value: str → value: int) to avoid redundant type casting.
- Added try-except handling to prevent ValueError when user input is not a number.
- Implemented testmod() to enable automated doctest verification.
- Fixed issue where input denominations were not sorted in descending order, which previously led to incorrect results.
2025-02-16 03:57:21 -05:00
Tianyi Zheng
73ebf7bdb1
Move and rename maths/greedy_coin_change.py
( #10418 )
...
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Move greedy_coin_change.py to greedy_methods/ and rename file
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-16 01:42:55 +02:00