Add: CombinationSum algorithm (Fixes #6804)#6869
Add: CombinationSum algorithm (Fixes #6804)#6869Tejasrahane wants to merge 5 commits intoTheAlgorithms:masterfrom
Conversation
Implements the Combination Sum algorithm using recursion and backtracking. This class finds all unique combinations of distinct integers that sum to a target value, where numbers can be used multiple times. - Added comprehensive JavaDoc documentation - Included Wikipedia and LeetCode references - Follows project naming conventions - Uses proper recursion and backtracking techniques Fixes TheAlgorithms#6804
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6869 +/- ##
============================================
+ Coverage 77.96% 78.01% +0.04%
- Complexity 6431 6450 +19
============================================
Files 736 738 +2
Lines 21476 21534 +58
Branches 4204 4211 +7
============================================
+ Hits 16744 16799 +55
- Misses 4060 4062 +2
- Partials 672 673 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@Tejasrahane Please add a corresponding test class so i can start the review |
|
Thank you for the review @DenizAltunkapan! I will add a corresponding test class for the CombinationSum algorithm to ensure proper test coverage. Could you please confirm if there are any specific test cases or edge cases you would like me to include in the test class? I want to make sure the tests meet the project's standards for the review process. I'll update the PR with the test class shortly. |
This test class covers various scenarios for the CombinationSum algorithm, including edge cases and multiple combinations.
Removed all instances of 'new CombinationSum()' in testBasicCase, testMultipleCombinations, and testNoSolution methods. Updated all calls to use the static method CombinationSum.combinationSum() directly instead of creating an instance, as the CombinationSum class has a private constructor and is designed to be used statically.
Implements the Combination Sum algorithm using recursion and backtracking. This class finds all unique combinations of distinct integers that sum to a target value, where numbers can be used multiple times.
Fixes #6804
clang-format -i --style=file path/to/your/file.java