## Find if there is any subset of size K with 0 sum in an array of -1 and +1

Given an integer K and an array arr containing only 1 and -1, the task is to find if there is any subset of size… Read More »

- Subset Sum Problem | DP-25
- Partition problem | DP-18
- Perfect Sum Problem (Print all subsets with given sum)
- Chocolate Distribution Problem
- Subset Sum | Backtracking-4
- Subset Sum Problem in O(sum) space
- Bell Numbers (Number of ways to Partition a Set)
- Subset with sum divisible by m
- Backtracking to find all subsets
- Find all distinct subset (or subsequence) sums of an array
- Largest divisible pairs subset
- Subset array sum by generating all the subsets
- Recursive program to generate power set
- Largest subset whose all elements are Fibonacci numbers
- Number of subsets with product less than k
- Count number of subsets having a particular XOR value
- Print equal sum sets of array (Partition Problem) | Set 2
- Number of subsets with sum divisible by m
- Sum of bitwise OR of all possible subsets of given set
- Number of possible Equivalence Relations on a finite set
- Sum of average of all subsets
- Number of subarrays for which product and sum are equal
- Count subsets having distinct even numbers
- Minimum difference between max and min of all K-size subsets
- Find all distinct subset (or subsequence) sums of an array | Set-2
- Printing all subsets of {1,2,3,...n} without using array or loop
- Minimum number of palindromes required to express N as a sum | Set 1
- Sum of all subsets of a set formed by first n natural numbers
- Maximum subset with bitwise OR equal to k
- Count minimum number of subsets (or subsequences) with consecutive numbers

Given an integer K and an array arr containing only 1 and -1, the task is to find if there is any subset of size… Read More »

Given an array arr[] of integer elements, the task is to find the total number of sub-sets of arr[] in which product of the elements… Read More »

Given a natural number n, print all the subsets of the set without using any array or loop (only the use of recursion is allowed).… Read More »

Given an array of size N and a sum, the task is to check whether some array elements can be added to sum to N… Read More »

Given an array and a Number N. The task is to check whether there exists any subset of this array such that the bitwise AND… Read More »

Given a number N, we have to find the minimum number of palindromes required to express N as a sum of them. Examples: Input: N… Read More »

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 »