## Minimum cost to modify a string

Given a string str consisting of lower case alphabets only and an integer K. The task is to find the minimum cost to modify the… Read More »

- Sliding Window Maximum : Set 2
- Median of sliding window in an array
- Basic Algorithm Techniques Not Taught in Academics
- Submatrix of given size with maximum 1's
- Length of the smallest substring which contains all vowels
- Count of substrings of length K with exactly K distinct characters
- Sum of all subarrays of size K
- Maximum number of set bits count in a K-size substring of a Binary String
- Shortest subarray to be removed to make all Array elements unique
- Longest subarray in which absolute difference between any two element is not greater than X
- Find subarray of Length K with Maximum Peak
- Count subarrays with sum equal to its XOR value
- Count of subarrays of size K with elements having even frequencies
- Remove k corner elements to maximize remaining sum
- Find the subarray of size K with minimum XOR
- Maximum count number of valley elements in a subarray of size K
- Count of distinct colors in a subtree of a Colored Tree with given min frequency for Q queries
- Maximize sum of K elements in Array by taking only corner elements
- Minimum bit flips such that every K consecutive bits contain at least one set bit
- Find maximum Subsequence Sum according to given conditions

Given a string str consisting of lower case alphabets only and an integer K. The task is to find the minimum cost to modify the… Read More »

Given an array arr[] of integers and an integer k, the task is to find the minimum number of integers that need to be removed… Read More »

Given a string S and a number K. The task is to find the minimum length substring having exactly K distinct characters. Note: The string… Read More »

Given an array of size N and an integer K, the task is to find the maximum for each and every contiguous sub-array of size… Read More »

Given two strings S1 and S2, the task is to count the number of sub-strings of S1 that are anagrams of any sub-string of S2.… Read More »

Given a string and a number k, the task is to find the number of substrings of length k whose sum of ASCII value of… Read More »

Given a number in the form of a string. The task is to find the maximum sum and product of m consecutive digits that are… Read More »

Given an array arr of n elements, the task is to find the number of the sub-arrays of the given array that contain at least… Read More »

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 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 occurrences of anagrams of the word in the text(For eg: anagrams of word for… Read More »