Skip to content

Tag Archives: sliding-window

Given an array arr[] containing N elements, the task is to remove a subarray of minimum possible length from the given array such that all… Read More
Given an array arr[] and integer K, the task is to find the minimum bitwise XOR sum of any subarray of size K in the… Read More
Given an integer array arr[] of size N and an integer X, the task is to find the longest sub-array where the absolute difference between… Read More
Given an array arr[], the task is to choose a subarray of size K which contains the maximum number of valley points with respect to… Read More
Given an array arr[] and an integer K, the task is to find the maximize the sum of K elements in the Array by taking… Read More
Given an integer array nums and an integer K, The task is to find the maximum sum of a non-empty subsequence of the array such… Read More
Given an array, the task is to remove total k elements from corners to maximize the sum of remaining elements. For example, if we k… Read More
Given an array arr[] of length n and a positive integer K, we have to find a subarray of length K which has maximum peak… Read More
Given a binary matrix mat[][] and an integer K, the task is to find the submatrix of size K*K such that it contains maximum number… Read More
Set 1: Sliding Window Maximum (Maximum of all subarrays of size k).Given an array arr of size N and an integer K, the task is… Read More
Given an array arr[] and an integer K, the task is to calculate the sum of all subarrays of size K. Examples:  Input: arr[] =… Read More
Given an array of integer arr[] and an integer k, the task is to find the median of each window of size k starting from… Read More
Given an array arr[] of size N and an integer K. The task is to find the count of subarrays such that each subarray has… Read More
Given an unsorted array of integers, find a subarray that adds to a given number. If there is more than one subarray with the sum… Read More
Given an array arr[] of N elements and an integer K, the task is to make any K elements of the array equal by performing… Read More