Skip to content

[FEATURE REQUEST] Basic Recursion #5502

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

Closed
Tuhinm2002 opened this issue Oct 1, 2024 · 10 comments
Closed

[FEATURE REQUEST] Basic Recursion #5502

Tuhinm2002 opened this issue Oct 1, 2024 · 10 comments

Comments

@Tuhinm2002
Copy link
Contributor

What would you like to Propose?

I found Dynamic Programming is there but the basic Recursion is not there. Problems like finding power set or subsets can only be done using recursion. Recursion plays an crucial role for setting the strong foundation for Dynamic programming.

My test cases :

package com.thealgorithms.Recursion;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

import java.util.ArrayList;

public class SubsetsTest {

    @Test
    void subset(){
        String str = "abc";
        ArrayList<String> ans = new ArrayList<>();
        ArrayList<String> actual = new ArrayList<>();
        ans.add("abc");
        ans.add("ab");
        ans.add("ac");
        ans.add("a");
        ans.add("bc");
        ans.add("b");
        ans.add("c");
        ans.add("");

        Subsets.subset("",str,actual);
        assertEquals(ans.toString(),actual.toString());
    }
}

Issue details

There is no package for recursion and recursion problems like producing subsets and powerset

Additional Information

No response

@dipeshsingh253
Copy link

Hi @Tuhinm2002 , I would like to contribute to this. I am not able to understand what is required here. Can you explain it in a brief?

Thanks !!!

sujitgunjal added a commit to sujitgunjal/subsetJava that referenced this issue Oct 1, 2024
@sujitgunjal sujitgunjal mentioned this issue Oct 1, 2024
@raxvab
Copy link

raxvab commented Oct 1, 2024

Is it still open for assignments?

@Tuhinm2002
Copy link
Contributor Author

Is it still open for assignments?

No its not an assignment. It is a feature request originally opened by me. First read contribution.md file before contributing

@dipeshsingh253
Copy link

I guess @sujitgunjal is already working on it.

@Tuhinm2002
Copy link
Contributor Author

I guess @sujitgunjal is already working on it.

Nope its originally requested by me as a feature. Its not an assignment

@siriak
Copy link
Member

siriak commented Oct 2, 2024

@Tuhinm2002 so you want to add these features yourself, right? Feel free to create a PR with them and tests

@Tuhinm2002
Copy link
Contributor Author

@Tuhinm2002 so you want to add these features yourself, right? Feel free to create a PR with them and tests

Yeah I created a PR with the name feat: recursion subsets added. Please review it. And after it gets merge I will complete the package all at once in the next PR. Because in this PR it is not possible to edit 😅

@Nandinig24
Copy link

Please assign the task to me

@Tuhinm2002
Copy link
Contributor Author

Please assign the task to me

It's not an assignment it's a feature request which has already been merged

@siriak
Copy link
Member

siriak commented Oct 7, 2024

Done

@siriak siriak closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants