Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FEATURE REQUEST] Add Combination Sum algorithm using recursion (java) (hacktoberfest'25) #6804

Open
@vaishnavi-parodkar

Description

What would you like to Propose?

I would like to propose adding the Combination Sum algorithm implementation under
Java/src/main/java/com/thealgorithms/recursion/.

This algorithm solves a classic recursion and backtracking problem finding all unique combinations of numbers that sum up to a target value. It's a popular interview and DSA question that fits perfectly in the recursion package.

Issue details

Given an array of distinct integers candidates and a target integer target, the task is to find all unique combinations of candidates where the chosen numbers sum to the target.
Each number in candidates may be used an unlimited number of times.

Example:
Input: candidates = [2,3,6,7], target = 7
Output: [[2,2,3],[7]]

Proposed Implementation Details

  • Implemented using recursion

Benefits:

  • Adds an essential recursive algorithm often used in coding interviews and competitive programming.

Additional Information

Reference: LeetCode Problem 39 - Combination Sum

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /