The Wayback Machine - https://web.archive.org/web/20201125010025/https://github.com/TheAlgorithms/Python/pull/2571
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coin change #2571

Merged
merged 12 commits into from Oct 23, 2020
Merged

Fix coin change #2571

merged 12 commits into from Oct 23, 2020

Conversation

@himadriganguly
Copy link
Contributor

@himadriganguly himadriganguly commented Oct 1, 2020

Describe your change:

Removed unused variable and modified code for coin_chainge algo.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.
himadriganguly and others added 8 commits Jul 15, 2020
Co-authored-by: Tapajyoti Bose <[email protected]>
Copy link
Member

@Kush1101 Kush1101 left a comment

Is it really a useful contribution?

@poyea poyea added invalid and removed invalid labels Oct 1, 2020
dynamic_programming/coin_change.py Outdated Show resolved Hide resolved
@himadriganguly himadriganguly requested a review from poyea Oct 1, 2020
>>> dp_count([1, 2, 3], -5)
0
>>> dp_count([4, 5, 6], -4)
0
>>> dp_count([2, 5, 3, 6], -10)
0
>>> dp_count([4], -4)
0
Comment on lines 22 to 29

This comment has been minimized.

@poyea

poyea Oct 1, 2020
Member

Suggested change
>>> dp_count([1, 2, 3], -5)
0
>>> dp_count([4, 5, 6], -4)
0
>>> dp_count([2, 5, 3, 6], -10)
0
>>> dp_count([4], -4)
0
>>> dp_count([1, 2, 3], -5)
0

I think 1 test case for this is enough.

This comment has been minimized.

@himadriganguly

himadriganguly Oct 1, 2020
Author Contributor

@poyea You said to add some more test cases in the previous comment?

This comment has been minimized.

@poyea

poyea Oct 5, 2020
Member

I mean to test the < 0 line, one test case is enough. You may add some larger test cases too to demonstrate the correctness.

@poyea
Copy link
Member

@poyea poyea commented Oct 1, 2020

Can you change the title of the pull request to something like fix coin change?

@poyea poyea mentioned this pull request Oct 1, 2020
@himadriganguly himadriganguly changed the title Patch 1 Fix coin change Oct 1, 2020
@himadriganguly
Copy link
Contributor Author

@himadriganguly himadriganguly commented Oct 5, 2020

@poyea done the changes have a look.

@poyea
poyea approved these changes Oct 23, 2020
@poyea poyea merged commit 46af42d into TheAlgorithms:master Oct 23, 2020
3 checks passed
3 checks passed
codespell
Details
pre-commit
Details
Travis CI - Pull Request Build Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.