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

# Tag Archives: sliding-window

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 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 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