## Maximum subset sum such that no two elements in set have same digit in them

Given an array of N elements. Find the subset of elements which has maximum sum such that no two elements in the subset has common… Read More »

- Split the array into equal sum parts according to given conditions
- Count of sub-sets of size n with total element sum divisible by 3
- Sum of (maximum element - minimum element) for all the subsets of an array.
- Number of subsets with zero sum
- Maximum subset sum such that no two elements in set have same digit in them
- Check if it is possible to get back to 12'0 clock only by adding or subtracting given seconds
- Count no. of ordered subsets having a particular XOR value
- Subset with sum closest to zero
- Find whether an array is subset of another array using Map
- Largest subset where absolute difference of any two element is a power of 2

Given an array of N elements. Find the subset of elements which has maximum sum such that no two elements in the subset has common… Read More »

Given an array ‘arr’ consisting of integers, the task is to find the non-empty subset such that its sum is closest to zero i.e. absolute… Read More »

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

Given an array ‘arr’ consisting of integers, the task is to find the number of subsets such that their sum is equal to zero. Empty… Read More »

Given an array arr[], the task is to compute the sum of (max{A} – min{A}) for every non-empty subset A of the array arr[]. Examples:… Read More »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »