-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Closed
Description
Is your feature request related to a problem? Please describe.
Count Subsets is an extension to the Subset Sum problem. Given an array arr[] of length N and an integer X, the task is to find the number of subsets with a sum equal to X.
Describe the solution you'd like
A Dynamic Programming-based solution to the above problem and the original recursion-based solution.
Additional context
Testcase:
Input: arr[] = {1, 2, 3, 3}, X = 6
Output: 3
All the possible subsets are {1, 2, 3},
{1, 2, 3} and {3, 3}
Input: arr[] = {1, 1, 1, 1}, X = 1
Output: 4
@siriak I am working on this. Kindly, assign this issue to me @samratpodder
Metadata
Metadata
Assignees
Labels
No labels