Given an array arr[] of size N and integer Y, the task is to find a minimum of all the differences between the maximum and… Read More

# Tag Archives: sliding-window

Prerequisites: Policy based data structure, Sliding window technique.Given an array of integer arr[] and an integer K, the task is to find the median of… Read More

Given a string str of size N and an integer K, the task is to generate a string whose substrings of size K can be… Read More

Given a binary string str of size N and a positive integer K, the task is to find the minimum number of flips required to… Read More

Given string str of the lowercase alphabet and an integer K, the task is to count all substrings of length K which have exactly K… Read More

Given a binary string S, and an integer K, the task is to find the minimum number of flips required such that every substring of… Read More

Given a binary string S of size N and an integer K. The task is to find the maximum number of set bit appears in… Read More

Given a N-ary tree with some colour associated with every node and Q queries. Each query contains two integers A and X. The task is… Read More

Given string str consisting of only lowercase English alphabets, the task is to find the substring of the smallest length which contains all the vowels.… Read More

We generally study most of the algorithmic techniques in academics like Searching, Sorting, Dynamic Programming, Greedy Algorithms, Divide and Conquer, Backtracking, etc. But below techniques… Read More