Given an array arr[] consisting of N positive integers and a positive integer K, the task is to maximize the GCD of the array arr[]… Read More

# Category Archives: Arrays

Given an array arr[] consisting of N natural numbers, the task is to find the length of the longest subsequence from the array which does… Read More

Given an array arr[] consisting of N positive integers, the task is to find the sum of all array elements having a distinct count of… Read More

Given an array arr[] consisting of N positive integers, the task is to check if the sum of the elements of any subset of the… Read More

Given an array arr[] consisting of N integers, the task is to find the sum of all subsets from an array, whose sum is a… Read More

Given a matrix mat[][] of dimensions N * M, and an integer K, the task is to find the maximum sum of any rectangle possible… Read More

Given a circular array arr[] consisting of N integers, the task is to replace all the array elements with the nearest possible power of its… Read More

Given an array A[] of size N, the task is to count the number of subsequences from the given array whose Bitwise XOR value is… Read More

Given an array arr[] of size N, representing the number of balls of each of N distinct colors, the task is to find the probability… Read More

Given an array arr[] of N integers, the task for each array element is to find the number of ways of choosing a pair of… Read More

Given an array arr[] of size N, the task is to find the minimum number of array elements required to be removed such that the… Read More

Given an array arr[] consisting of N positive integers, the task is to find the maximum value of ∑(M mod arr[i]), where arr[i] is any… Read More