Skip to content

Tag Archives: subarray

Given an array arr[] of length N, the task is to replace all subarrays of only even elements by their length if the length is… Read More
Given an array nums[ ] of size N, the task is to split the array into groups of size K using the following procedure: The… Read More
Given an array arr[] of size N, the task is to print the longest increasing subarray such that elements in the subarray are consecutive integers.… Read More
Given an array arr[] of size N, and integer K. The task is to find the length of the longest subarray with the difference between… Read More
Given an array arr[] of size N, and integer K. The task is to find the longest subarray with the difference between adjacent elements as… Read More
Given an array arr[] of N integers, the task is to find the length of the longest increasing subarray such that elements in the subarray… Read More
Given an array arr[] of length N (1≤ arr[i] ≤ N) and an integer K. The task is to find the largest median of any… Read More
Given an array arr[], the task is to find the count of subarrays starting from the current element that has a minimum element as the… Read More
Given an array arr[] of size N, the task is to minimize the  cost to sort the array by sorting any unsorted subarray where the… Read More
Given a binary array arr[] of N integers, the task is to find the maximum count of distinct sized subarrays such that the sum of… Read More
Given an array arr[] of N integers and an integer K, the task is to find the length of the longest subarray that forms an… Read More
Given an array arr[] of size N, the task is to maximize the difference of the sum of elements at even indices and elements at… Read More
Given an array arr[] of length N and an integer K. The task is to find the minimum length of subarray such that at least… Read More
Given an array arr[] containing integers. The task is to find the number of decreasing subarrays with a difference of 1.  Examples:  Input: arr[] =… Read More
Given an array arr containing N integers, the task is to find the sum of the absolute difference of maximum and minimum of all subarrays.… Read More

Start Your Coding Journey Now!