## Find all distinct subset (or subsequence) sums of an array | Set-2

Given an array of N positive integers write an efficient function to find the sum of all those integers which can be expressed as the… Read More »

Given an array of N positive integers write an efficient function to find the sum of all those integers which can be expressed as the… Read More »

Given an array of integers, find number of subsequence such that the sum of the subsequence is divisible by m. It is given that sum… Read More »

Given a set represented as string, write a recursive code to print all subsets of it. The subsets can be printed in any order. Examples:… Read More »

Given an array of non negative integers and an integer k, find the subset of maximum length with bitwise OR equal to k. Examples :… Read More »

Given an array arr[]. Determine whether it is possible to split the array into two sets such that the sum of elements in both the… Read More »

Given an array arr[] of size n, we need to find sum of all the values that comes from ORing all the elements of the… Read More »

Given an array of n elements, the task is to find the fibonacci sum of a subset of the array where every element of the… Read More »

You are given an array of n-elements, you have to find the number of subsets whose product of elements is less than or equal to… Read More »

An equivalence relation is Reflexive, Symmetric and Transitive. Before counting the number of possible equivalence relations on a set |A|=n, let us see an example… Read More »

Given a number n, divide first n natural numbers (1, 2, …n) into two subsets such that difference between sums of two subsets is minimum.… Read More »

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

Given an array of n distinct elements, find length of the largest subset such that every pair in the subset is such that the larger… Read More »

Given an array and two integers k and d, find the number of subsets of this array of size k, where difference between the maximum… Read More »

Given a number n, we need to find the sum of all the elements from all possible subsets of a set formed by first n… Read More »

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… Read More »