Skip to content

[FEATURE REQUEST] Basic Recursion #5502

@Tuhinm2002

Description

@Tuhinm2002

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

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