## Number of sub-strings which are anagram of any sub-string of another string

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 »

- Minimum length substring with exactly K distinct characters
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Count substrings that contain all vowels | SET 2
- Count of substrings which contains a given character K times
- Number of sub-strings that contain the given character exactly k times
- Queries to find the first non-repeating character in the sub-string of a string
- Maximum length palindromic substring such that it starts and ends with given char
- Queries to check if string B exists as substring in string A
- Minimum number of sub-strings of a string such that all are power of 5
- Maximum count of sub-strings of length K consisting of same characters
- Count number of distinct substrings of a given length
- Length of the longest substring that do not contain any palindrome
- Length of the longest substring with no consecutive same letters
- Queries to find the last non-repeating character in the sub-string of a given string
- Replace two substrings (of a string) with each other
- Check if the given string is K-periodic
- Count of non-overlapping sub-strings "101" and "010" in the given binary string
- Find distinct characters in distinct substrings of a string
- Longest substring of only 4's from the first N characters of the infinite string
- Find the count of sub-strings whose characters can be rearranged to form the given word
- Count the number of common divisors of the given strings
- Count of sub-strings that do not contain all the characters from the set {'a', 'b', 'c'} at the same time
- Rearrange given string to maximize the occurrence of string t
- Minimum length of the sub-string whose characters can be used to form a palindrome of length K
- Check if string can be made lexicographically smaller by reversing any substring
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range
- Count of sub-strings that do not consist of the given character
- Count of sub-strings that contain character X at least once

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 an integer K and a string str of lowercase English characters, the task is to find a string s such that when s is… Read More »

Given a string of length consisting of lowercase alphabets. The task is to find the number of such substrings whose characters occur in alphabetical order.… Read More »

Given a string str consisting of lowercase English alphabets, the task is to find the total number of palindromic sub-strings present in the sorted form… Read More »

Given a string of length N of lowercase characters containing 0 or more vowels, the task is to find the count of vowels occurred in… Read More »

Given a binary string, the task is to count the minimum steps to remove substring “010” from this binary string. Examples: Input: binary_string = “0101010”… Read More »

S is string containing only lowercase English alphabets. We need to find if there exists at least one palindromic sub-string whose length is even. Examples:… Read More »

Given a string ‘str’, two integers ‘k’ and ‘p’. The task is to count all the sub-strings of ‘str’ having exactly ‘k’ characters that have… Read More »

Given a string ‘S’ (composed of digits) and an integer ‘X”, the task is to count all the sub-strings of ‘S’ that satisfy the following… Read More »

Given a string ‘s’ check if all of its palindromic sub-strings are of odd length or not. If yes then print “YES” or “NO” otherwise.… Read More »

Given a string S. The task is to print the K-th lexicographically smallest one among the different substrings of s. A substring of s is… 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 a string ‘s’, the task is to check whether the string has both prefix and suffix substrings of length greater than 1 which are… Read More »

Given a string S consisting of lowercase characters(a-z) only, the task is to print a new string by rearranging the string in such a way… Read More »

Suppose we are given a string s1, we need to the find total number of substring(including multiple occurrences of the same substring) of s1 which… Read More »