## Split the array into equal sum parts according to given conditions

Given an integer array arr[], the task is to check if the input array can be split in two sub-arrays such that: Sum of both… Read More »

## Count of sub-sets of size n with total element sum divisible by 3

Given an integer n and a range [l, r], the task is to find the count of total sub-sets of size n with integers from… Read More »

## Count no. of ordered subsets having a particular XOR value

Given an array arr[] of n elements and a number K, find the number of ordered subsets of arr[] having XOR of elements as K… Read More »

## Check if it is possible to get back to 12’0 clock only by adding or subtracting given seconds

Given N seconds. The task is to check if it is possible to start from 12’0 clock and get back to 12 only adding or… Read More »

## Largest subset where absolute difference of any two element is a power of 2

Given an array arr[] of distinct elements -109 ≤ ai ≤ 109. The task is to find the largest sub-set from the given array such… Read More »

## Recursive program to print all subsets with given sum

Given an array and a number, print all subsets with sum equal to given the sum. Examples: Input : arr[] = {2, 5, 8, 4,… Read More »

## Count sub-sets that satisfy the given condition

Given an array arr[] and an integer x, the task is to count the number of sub-sets of arr[] sum of all of whose sub-sets… Read More »

## Maximize the difference between two subsets of a set with negatives

Given an of integers of size N. The task is to separate these integers into two groups g1 and g2 such that (sum of elements… Read More »

## Subset Sum Queries in a Range using Bitset

Given an array[] of N positive integers and M queries. Each query consists of two integers L and R represented by a range. For each… Read More »

## 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 »

## Total number of subsets in which the product of the elements is even

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 »

## Printing all subsets of {1,2,3,…n} without using array or loop

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 »

## Subset array sum by generating all the subsets

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 »

## Check whether bitwise AND of a number with any subset of an array is zero or not

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 »

## Minimum number of palindromes required to express N as a sum | Set 1

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 »