## Maximum number of Unique integers in Sub-Array of given size

Given an array of N integers and a number M. The task is to find out the maximum number of unique integers among all possible… Read More »

- Find subarray with given sum | Set 1 (Nonnegative Numbers)
- Sliding Window Maximum (Maximum of all subarrays of size k)
- Find the smallest window in a string containing all characters of another string
- Smallest window that contains all characters of string itself
- Number of subarrays having product less than K
- Smallest subarray with sum greater than a given value
- Count distinct elements in every window of size k
- Find maximum of minimum for every window size in a given array
- Anagram Substring Search (Or Search for all permutations)
- Window Sliding Technique
- Length of the smallest sub-string consisting of maximum distinct characters
- Find maximum (or minimum) sum of a subarray of size k
- Number of subarrays having sum less than K
- Sum of minimum and maximum elements of all subarrays of size k.
- Longest Subarray having sum of elements atmost 'k'
- Number of subarrays with given product
- Largest sum subarray with at-least k numbers
- First negative integer in every window of size k
- Maximum sum subarray having sum less than or equal to given sum
- Count Occurences of Anagrams
- Subarray of size k with given sum
- Subarray with no pair sum divisible by K
- Number of subarrays with maximum values in given range
- Maximum Unique Element in every subarray of size K
- Minimum Swaps required to group all 1's together
- Longest subarray not having more than K distinct elements
- Number of subarrays having sum in a given range
- Smallest subarray with k distinct numbers
- Majority element in a circular array of 0's and 1's
- Subarray whose absolute sum is closest to K

Given an array of N integers and a number M. The task is to find out the maximum number of unique integers among all possible… Read More »

Given an array of size N and an integer K, find the minimum for each and every contiguous subarray of size K. Examples: Input :… Read More »

Given a string ‘str’ and an integer ‘k’, the task is to count the number of sub-strings of length ‘k’ which are comprised of the… Read More »

Given an array arr[], an integer K and a Sum. The task is to check if there exists any subarray with K elements whose sum… Read More »

Given a circular array containing only 0’s and 1’s, of size n where n = p*q (p and q are both odd integers). The task… Read More »

Given a String str and an integer k, find the lexicographically smallest and largest substring of length k Lexicography order, also called as alphabetical order… Read More »

Given a word and a text, return the count of the occurences of anagrams of the word in the text(For eg: anagrams of word for… Read More »

Given an array of n elements and an integer K, the task is to find the subarray with minimum value of ||a[i] + a[i +… Read More »

Given an array arr[] of positive integers and a range (L, R). Find number of subarrays having sum in the range L to R. Examples:… Read More »

Given an array of 0s and 1s, find the position of 0 to be replaced with 1 to get longest continuous sequence of 1s. Expected… Read More »

You are given two Integers N and M, and print all the terms of the series upto M-terms of the N-bonacci Numbers. For example, when… Read More »

Given an array of N non-negative integers, task is to find the maximum size of a subarray such that the pairwise sum of the elements… Read More »

Given an array of numbers and a number k, find the number of subarrays having sum less than k. We may assume that there is… Read More »

Given an array of positive numbers and a number k, find the number of subarrays having product exactly equal to k. We may assume that… Read More »

Given an array of 0’s and 1’s, we need to write a program to find the minimum number of swaps required to group all 1’s… Read More »