## Sub-strings of length K containing same character

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 »

- Count of substrings which contains a given character K times
- Maximum sum of K consecutive nodes in the given Linked List
- Minimum cost to modify a string
- Number of sub-strings that contain the given character exactly k times
- Minimum number of elements to be removed such that the sum of the remaining elements is equal to k
- Find subarray with given sum with negatives allowed in constant space
- Minimum increment operations to make K elements equal

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 String str and an integer k, find the lexicographically smallest and largest substring of length k Lexicography order, also called as alphabetical order or… 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 non-negative numbers and a non-negative number k, find the number of subarrays having sum less than k. We may assume that… 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 »

Given a large number as string s and an integer k which denotes the number of breakpoints we must put in the number k <=… Read More »

Given an array of size n. The problem is to find the longest sub-array having exactly k odd numbers. Examples: Input : arr[] = {2,… Read More »