Given an array arr[] consisting of N integers and an integer K, the task is to find the minimum of operations required to make all… Read More

# Tag Archives: subarray

Given an array arr[] consisting of N positive integers and a positive integer K, the task is to update the given array by replacing the… Read More

Given an array arr[] consisting of N integers and two positive integers K and M, the task is to find the number of subarrays of… Read More

Given an array arr[ ] of size N, the task is to find the minimum difference between maximum and minimum elements of all possible sized subarrays… Read More

Given an array arr[] consisting of N integers, the task is to find the minimum number of splitting of array elements into subarrays such that… Read More

Given an array arr[] consisting of N integers and an integer K, the task is to find the minimum number of sets, the array elements… Read More

Given an array arr[] of N distinct integers, the task is to check if it is possible to sort the array in increasing order by… Read More

Given an array arr[], the task is to find the longest subarray whose sum is a prime number. Examples: Input: arr[ ] = {1, 4,… Read More

Given an array arr of size N, the task is to find pair of elements having minimum sum, which on removal breaks the array into… Read More

Given an array arr[] consisting of N positive integers, the task is to find the minimum product of maximum and minimum among all possible subarrays.… Read More

Given an array arr[] consisting of N integers, the task is to find the number of ways to split the array into non-empty subarrays such… Read More

Given an array arr[] consisting of N integers, the task is to find the maximum length of subarray having the Greatest Common Divisor (GCD) of… Read More

Given an array arr[] consisting of N integers and a positive integer M, the task is to find the maximum frequency for each M length… Read More

Given an array A[ ] of N non-negative integers, the task is to find the length of the longest sub-array such that all the elements… Read More

Given an array arr[] of length N, the task is to find the number of Good Ranges in the array arr[]. A Good Range is… Read More

What's New