## Sum of sum of all subsets of a set formed by first N natural numbers

Given N, and ff(N) = f(1) + f(2) + …… + f(N), where f(k) is the sum of all subsets of a set formed by… Read More »

- Subset array sum by generating all the subsets
- Recursive program to print all subsets with given sum
- Printing all subsets of {1,2,3,...n} without using array or loop
- Count of sub-sets of size n with total element sum divisible by 3
- Split the array into equal sum parts according to given conditions
- Total number of subsets in which the product of the elements is even
- Subset Sum Queries in a Range using Bitset
- Sum of (maximum element - minimum element) for all the subsets of an array.
- Maximize the difference between two subsets of a set with negatives
- Check if it is possible to get back to 12'0 clock only by adding or subtracting given seconds
- Minimum number of palindromes required to express N as a sum | Set 1
- Count sub-sets that satisfy the given condition
- Check whether bitwise AND of a number with any subset of an array is zero or not
- Count no. of ordered subsets having a particular XOR value
- Largest subset where absolute difference of any two element is a power of 2
- Find if there is any subset of size K with 0 sum in an array of -1 and +1

Given N, and ff(N) = f(1) + f(2) + …… + f(N), where f(k) is the sum of all subsets of a set formed by… Read More »

In number theory, a weird number is a natural number that is abundant but not semiperfect. In other words, the sum of the proper divisors… Read More »

In number theory, a semiperfect number or pseudoperfect number is a natural number n that is equal to the sum of all or some of… 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 »