Minimum subarray reversals required to make given binary array alternating
Given a binary array arr[] consisting of equal count of 0s and 1s, the task is to count the minimum number of subarray reversal operations… Read More »
Given a binary array arr[] consisting of equal count of 0s and 1s, the task is to count the minimum number of subarray reversal operations… Read More »
Given a circular array arr[] consisting of N integers, the task is to print the Next Greater Element for every element of the circular array.… Read More »
Given an array arr[] consisting of N integers and an integer K, the task is to find the length of the longest subarray in which… Read More »
Given an array arr[] of size N, the task is to find the frequency of each distinct element present in the given array. Examples: Input:… Read More »
Given an array arr[] of size N, the task is to find the longest non-empty subsequence from the given array whose sum is maximum. Examples:… Read More »
Given an array arr[] of length N, the task is to find the count of array indices such that removing an element from these indices… Read More »
Given an array, arr[] of size N, the task is to find the count of array indices such that removing an element from these indices… Read More »
Given an array arr[] of length N, the task is to modify the given array by replacing each element of the given array by its… Read More »
Given an array arr[] consisting of N integers and three integers X, Y, and K, the task is to find the farthest index that can… Read More »
Given an array arr[] of size N, two positive integers M and K, the task is to partition the array into M equal length subsets… Read More »
Given an array arr[] consisting of N positive integers and an integer K, the task is to minimize the difference between the maximum and minimum… Read More »
Given a 2D array arr[][] of size N * M, and an integer K, the task is to select K elements with maximum possible sum… Read More »
There are some colored rabbits in a forest. Given an array arr[] of size N, such that arr[i] denotes the number of rabbits having same… Read More »
Given two binary arrays X[] and Y[] of size N, the task is to convert array X[] into array Y[] by minimum number of operations… Read More »
Given an array arr[] consisitng of a permutation of first N natural numbers, the task is to find the minimum number of clockwise circular rotations… Read More »