Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum.
Example:
Input: set[] = {3, 34, ...

Share

Subset sum problem is to find subset of elements that are selected from a given set whose sum adds up to a given number K. We are considering the set contains no...

Share

Character.Subset Class represents particular subsets of the Unicode(standards using hexadecimal values to express characters – 16bit) character set. The subset...

Share

Given two arrays: arr1[0..m-1] and arr2[0..n-1]. Find whether arr2[] is a subset of arr1[] or not. Both the arrays are not in sorted order. It may be assumed that ele...

Share

Subset sum problem is to find subset of elements that are selected from a given set whose sum adds up to a given number K. We are considering the set contains no...

Share

Given a set of positive integers, find all its subsets.
Examples:
Input : 1 2 3
Output : // this space denotes null element.
1
1 2
1 2...

Share

Given an integer array of N elements, the task is to divide this array into K non-empty subsets such that the sum of elements in every subset is same. All elements of...

Share

Given a set of positive integers, find all its subsets. The set can contain duplicate elements, so any repeated subset should be considered only once in the output.
E...

Share

Given an array of non-negative integers and a value sum, determine if there is a subset of the given set with sum equal to given sum.
Examples:
Input : arr[] = {4, 1,...

Share

Given an array of integers and a sum, the task is to print all subsets of given array with sum equal to given sum.
Examples:
Input : arr[] = {2, 3, 5, 6, 8, 10}
...

Share