Skip to content

Tag Archives: subset

Given an array, arr[], and an integer K, the task is to find the total number of ways in which we can divide the array… Read More
Given an array A[] with size N, Select a subsequence B = {B[1], B[2], B[3], ………B[N] } of size M from given array A[]  (N… Read More
Given an array arr[] of size N, the task is to find the maximum sum of a subset of the array such that the sum… Read More
Given an array arr[] (where arr[i] lies in the range [2, 30] )of size N, the task is to find the number of subsets such… Read More
Given an array arr[] of size N, the task is to find the maximum number of subsets the array can be split such that the… Read More
Given an array arr[] of length N, the task is to find the maximum number of subsets that can be obtained from the given array… Read More
Given an array arr[] of size N and a given difference diff, the task is to count the number of partitions that we can perform… Read More
Given an array A[] of positive integers, print all the unique non-empty subsets of the array  Note: The set can not contain duplicate elements, so… Read More
Given an array arr[] of integers of size N that might contain duplicates, the task is to find all possible unique subsets, using C++ STL.… Read More
Given an array arr[] of positive integers of size N, the task is to divide the array into two non-empty subsets X and Y in… Read More
Given an array arr[] of size N such that the sum of all the array elements does not exceed N, and array queries[] containing Q… Read More
Given an array arr[] of size N and an integer K, the task is to find the size of the largest subset possible having a… Read More
Given an array arr[] that contains N integers, the task is to find the largest subset having sum at least 0. Examples: Input: arr[] =… Read More
Given two arrays A[] and B[] of N integers, the task is to find for each element A[i], the size of the smallest subset S… Read More
Given an array arr[] containing N integers and an integer K, the task is to minimize the subset-sum difference after removing K elements from the… Read More

Start Your Coding Journey Now!