# Tag Archives: subset

## Largest subset having with sum less than equal to sum of respective indices

Given an array arr[], the task is to find the length of the largest subset with the sum of elements less than or equal to… Read More »

## Largest subset with M as smallest missing number

Given an array arr[] of N positive integers and a positive integer M, the task is to find the length of longest subset whose smallest… Read More »

## Split array into K subsets to maximize their sum of maximums and minimums

Given an integer K and an array A[ ] whose length is multiple of K, the task is to split the elements of the given… Read More »

## Maximum size subset with given sum using Backtracking

Given an array arr[] consisting of N integers and an integer K, the task is to find the length of longest subsequence with sum equal… Read More »

## Maximum number of elements greater than X after equally distributing subset of array

Given an array, arr[] and an integer X, the task is to count the number of elements greater than X after equally dividing the subset… Read More »

## Check if it is possible to split given Array into K odd-sum subsets

Given an array arr[] of length N, the task is to check if it is possible to split the given array into K non-empty and… Read More »

## Partition a set into two subsets such that difference between max of one and min of other is minimized

Given an array arr[] of N integers, the task is to split the array into two subsets such that the absolute difference between the maximum… Read More »

## Partition of a set into K subsets with equal sum using BitMask and DP

Given an integer array arr[] of consisting of N integers, the task is check if it is possible to divide the given array into K… Read More »

## Subsets of size K with product equal to difference of two perfect squares

Given a distinct integers array arr[] of size N and an integer K, the task is to count the number of subsets of size K… Read More »

## Count of subsets having sum of min and max element less than K

Given an integer array arr[] and an integer K, the task is to find the number of non-empty subsets S such that min(S) + max(S)… Read More »

## Split a binary string into K subsets minimizing sum of products of occurrences of 0 and 1

Given a binary string S, the task is to partition the sequence into K non-empty subsets such that the sum of products of occurences of… Read More »

## Sum of product of all subsets formed by only divisors of N

Given a number N, the task is to find the sum of the product of elements of all the possible subsets formed by only divisors… Read More »

## Product of all sorted subsets of size K using elements whose index divide K completely

Given an integer array arr[] of N distinct elements and a positive integer K ( K <= N ). The task is to calculate the… Read More »

## Split N powers of 2 into two subsets such that their difference of sum is minimum

Given an even number N, the task is to split all N powers of 2 into two sets such that the difference of their sum… Read More »

## Maximum sum subset having equal number of positive and negative elements

Given an array arr[], the task is to find the maximum sum subset containing the equal number of positive and negative elements. Examples: Input: arr[]… Read More »