Skip to content

Tag Archives: sliding-window

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[] 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 K, the task is to find the maximum count of Armstrong Numbers present… Read More
Given an array arr[] of size N and an integer K, the task is to print the difference between the maximum and minimum average of… Read More
Given an array arr[] consisting of N positive integers and a positive integer K, the task is to find the maximum sum of the subarray… Read More
Given a string S consisting of N lowercase characters, the task is to find the length of the longest substring that does not contain any… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to find the highest frequency of any array element… Read More
Given an array arr[] of size N and an integer K, the task is to count the number of negative elements present in all K-length… Read More
Given an array arr[] of size N and an integer K, the task is to find the maximum possible frequency of any array element by… Read More
Given a string S consisting of lowercase characters and an integer K, the task is to find the maximum length of a subsequence consisting of… Read More
Given an integer K and an array A[] of size N, the task is to create a new array with sum K with minimum number… Read More
Given a string S consisting of N characters and a positive integer K, the task is to count the number of substrings having at least… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to print the maximum sum possible in a subsequence satisfying… Read More
Given two strings S1 and S2, the task is to check if S2 contains an anagram of S1 as its substring. Examples:   Input: S1 =… Read More