Skip to content

Tag Archives: subset

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
Given an array arr[] of size N, the task is to find the maximum possible sum of a subset of the array such that no… Read More
Given an array arr[] containing N elements, the task is to find the size of the largest subset for each array element arr[i] such that… Read More
Given an array Arr[] of size N, the task is to find the count of subsets of Arr[] that can be partitioned into two non-empty… Read More
Given an array arr[] of length N, the task is to find the minimum number of unique elements possible in total when the array is… Read More
Given an array arr[] of size N, the task is to find the maximum sum of means of 2 non-empty subsets of the given array… Read More
Given an array arr[] of N integers and an integer K, the task is to calculate the minimum cost by spilling the array elements into… Read More
Given an array arr[] containing N non-negative integers, the task is to find the maximum AND value among all the subsets having length K.  Examples: … Read More
Given an array arr[] of size N. The task is to count the number of unique subsets.  Examples: Input: arr[] = {1, 2, 2}Output: 6Explanation:… Read More
Given an array arr[] of positive numbers. The task is to check if there exists any subset of any size such that after multiplying each… Read More

Start Your Coding Journey Now!