Skip to content

Tag Archives: sliding-window

Given an integer array of size n, find the maximum of the minimum’s of every window size in the array. Note that window size varies… Read More
Given an array of size n and an integer k, return the count of distinct numbers in all windows of size k.  Example: Become a success… Read More
There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs… Read More
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or… Read More
Given an array of integers and a number x, find the smallest subarray with sum greater than the given value.  Examples: arr[] = {1, 4,… Read More
Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples :  Input: arr[] = {1, 4, 20, 3,… Read More
Given an array and an integer K, find the maximum for each and every contiguous subarray of size k. Examples : Become a success story instead… Read More
Given two strings, string1 and string2, the task is to find the smallest substring in string1 containing all characters of string2 efficiently.  Examples: Become a success… Read More

Start Your Coding Journey Now!