Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix recursion issues in algorithms/sets/combination-sum #458
Conversation
codecov
bot
commented
Jan 30, 2020
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 149 149
Lines 2612 2618 +6
Branches 434 434
=====================================
+ Hits 2612 2618 +6
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
casca commentedJan 30, 2020
My changes should fix #308.
I have refactored combinationSum to use an iterative approach to avoid stack overflows when the decision tree gets too deep (candidates=[1], target=100000).
Additionally, the code now filters out any candidate equal to zero to avoid loops.