Java icon indicating copy to clipboard operation
Java copied to clipboard

[FEATURE REQUEST] new dp algo `UniqueSubsequenceCount`

Open Tuhinm2002 opened this issue 1 year ago • 4 comments

What would you like to Propose?

This algo counts the number of unique subsequence or subsets can be produced from a string.

  • Test cases
public class UniqueSubsequencesCountTest {

    @Test
    void subseqCountTestOne() {
        String s = "abc";

        assertEquals(7, UniqueSubsequencesCount.subseqCount(s));
    }

    @Test
    void subseqCountTestTwo() {
        String s = "abcdashgdhas";

        assertEquals(3592, UniqueSubsequencesCount.subseqCount(s));
    }

    @Test
    void subseqCountTestThree() {
        String s = "aaaaa";

        assertEquals(5, UniqueSubsequencesCount.subseqCount(s));
    }
}

Issue details

This algorithm is missing but is an important approach in dynamic programming

Additional Information

No response

Tuhinm2002 avatar Oct 05 '24 16:10 Tuhinm2002

@Tuhinm2002 I would like to add solution to this problem. Could you please assign it to me ?

RahulMohanK avatar Oct 05 '24 19:10 RahulMohanK

@Tuhinm2002 I would like to add solution to this problem. Could you please assign it to me ?

That's not an assignment that is a feature request created by me. There is already a PR for this

Tuhinm2002 avatar Oct 05 '24 19:10 Tuhinm2002

@siriak hey i created a new pr for a new algo in dp check out here https://github.com/TheAlgorithms/Java/pull/5586

Tuhinm2002 avatar Oct 06 '24 08:10 Tuhinm2002

please assign this to me

Aastha-ojha-20 avatar Oct 07 '24 12:10 Aastha-ojha-20