## Queries On Array with disappearing and reappearing elements

Given an array arr[] of size N. Each second an integer disappears for N seconds and after N seconds, it reappears at its original position.… Read More »

## Contiguous subsegments of a string having distinct subsequent characters

Given a string str of length L and an integer N, the task is to form a total of (L / N) contiguous subsegments of… Read More »

## Number of subsequences with positive product

Given an array arr[] of N integers, the task is to find the count of all the subsequences of the array that have positive product.… Read More »

## Maximum value obtained by performing given operations in an Array

Given an array arr[], the task is to find out the maximum obtainable value. The user is allowed to add or multiply the two consecutive… Read More »

## Append two elements to make the array satisfy the given condition

Given an array arr[] of non-negative integers, let’s define X as the XOR of all the array elements and S as the sum of all… Read More »

## Number of pairs in an array having sum equal to product

Given an array arr[], the task is to find the number of pairs (arr[i], arr[j]) in the array such that arr[i] + arr[j] = arr[i]… Read More »

## Remove minimum elements from ends of array so that sum decreases by at least K | O(N)

Given an array arr[] consisting of N elements, the task is to remove minimum number of elements from the ends of the array such that… Read More »

## Maximize the sum of differences of consecutive elements after removing exactly K elements

Given a sorted array arr[] of length N and an integer K such that K < N, the task is to remove exactly K elements… Read More »

## Find the Largest divisor Subset in the Array

Given an array arr[] of N integers, the task is to find the largest subset of arr[] such that in every pair of numbers from… Read More »

## Minimum K such that sum of array elements after division by K does not exceed S

Given an array arr[] of N elements and an integer S. The task is to find the minimum number K such that the sum of… Read More »

## Smallest number dividing minimum number of elements in the array | Set 2

Given an array arr[] of N integers, the task is to find the smallest number that divides the minimum number of elements from the array.… Read More »

## Smallest number dividing minimum number of elements in the Array

Given an array arr[] of N integers, the task is to find the smallest number that divides the minimum number of elements from the array.… Read More »

## Minimum elements to be removed from the ends to make the array sorted

Given an array arr[] of length N, the task is to remove the minimum number of elements from the ends of the array to make… Read More »

## Find the minimum difference path from (0, 0) to (N-1, M-1)

Given two 2D arrays b[][] and c[][] of N rows and M columns. The task is to minimise the absolute difference of the sum of… Read More »

## Remove minimum numbers from the array to get minimum OR value

Given an array arr[] of N positive integers, the task is to find the minimum number of elements to be deleted from the array so… Read More »