Skip to content

Tag Archives: subset

Given an array A[] of size N, and two numbers K and D, the task is to calculate the maximum subset-sum divisible by D possible… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to check if it is possible to reduce the… Read More
Given an array A[] consisting of N non-negative integers, and an integer K, the task is to find the number of ways ‘+’ and ‘-‘… Read More
Given an array A[] of size N and an integer diff, the task is to count the number of ways to split the array into… Read More
Given two arrays A[] and B[] consisting of N and M integers respectively, and an integer K, the task is to find the sum nearest… Read More
Given an array arr[] consisting of N integers, the task is to print the smaller of the two subsets obtained by splitting the array into… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the maximum number of disjoint subsets that the… Read More
Given two arrays arr[] and S[] consisting of N and K integers, the task is to find the maximum sum of minimum and maximum of… Read More
Given an array arr[] consisting of N binary strings, and two integers A and B, the task is to find the length of the longest… Read More
Given an adjacency matrix adj[][] of an undirected graph consisting of N vertices, the task is to find whether the graph contains a Hamiltonian Path… Read More
Given an array arr[] consisting of N binary strings, and two integers A and B, the task is to find the length of the longest… Read More
Given an array A[] of size N, the task is to find the length of the longest strictly increasing subset with every pair of adjacent… Read More
Given an array arr[] consisting of N positive integers and a positive integer K, the task is to find the minimum difference between the sum… Read More
Given an array arr[] consisting of N odd integers, the task is to count the different number of ways to make the product of all… Read More