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

Create Combination_sum.java #488

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thebharat07
Copy link

Combination sum solution in java.

Explanation of the solution:

So, here we are asked to return lists of integers whose sum is equal to a given a target.
For that our general idea is to add all the possible numbers less than the target for any number of times to achieve the target and create a list of all the numbers we used.
This is where BACKTRACKING comes into play.
We will recursively send our list which contains the solutions and a list which keeps track of our solution and and integer from where we will iterate through the given values and find the solution.

Combination sum solution in java.
Copy link

welcome bot commented Jun 24, 2024

I can tell this is your first pull request! Thank you I'm so honored. 🎉🎉🎉 I'll take a look at it ASAP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants