## Count of substrings which contains a given character K times

Given a string consisting of numerical alphabets, a character C and an integer K, the task is to find the number of possible substrings which… Read More »

- Count distinct substrings that contain some characters at most k times
- Minimum length substring with exactly K distinct characters
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Minimum K such that every substring of length atleast K contains a character c
- Number of sub-strings that contain the given character exactly k times
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Substring Reverse Pattern
- Python | Finding strings with given substring in list
- Maximum count of sub-strings of length K consisting of same characters
- Queries to find the first non-repeating character in the sub-string of a string
- Check if the given string is K-periodic
- Length of the longest substring with no consecutive same letters
- Queries to check if string B exists as substring in string A
- Find the count of sub-strings whose characters can be rearranged to form the given word
- Replace two substrings (of a string) with each other
- Count of sub-strings that do not contain all the characters from the set {'a', 'b', 'c'} at the same time
- Queries to find the last non-repeating character in the sub-string of a given string
- Length of the longest substring that do not contain any palindrome
- Count of substrings which contains a given character K times
- Count the number of common divisors of the given strings
- Longest substring of only 4's from the first N characters of the infinite string
- Rearrange given string to maximize the occurrence of string t
- Check if string can be made lexicographically smaller by reversing any substring
- Minimum length of the sub-string whose characters can be used to form a palindrome of length K
- 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 number of distinct substrings of a given length
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- Queries to answer the X-th smallest sub-string lexicographically
- Minimum number of sub-strings of a string such that all are power of 5

Given a string consisting of numerical alphabets, a character C and an integer K, the task is to find the number of possible substrings which… Read More »

Given a string str and an integer K, the task is to find the length of the longest sub-string S’ such that every character in… Read More »

Given a string str, the task is to answer Q queries where every query consists of two integers L and R and we have to… Read More »

Given a string S of length N consisting of lower-case English albhabets and an integer ‘l’, find the number of distinct sub-strings of length ‘l’… Read More »

Given a string str, the task is to count the number of ways a palindromic sub-string could be formed by concatenation of three sub-strings x,… Read More »

Given two strings A, B and some queries consisting of an integer i, the task is to check whether the sub-string of A starting from… Read More »

Given two binary strings s and t. The task is to rearrange the string s in such a way that the occurrence of string t… Read More »

Given a binary string str, the task is to find the maximum length of the sub-string of str that has odd parity. A binary string… Read More »

Given a string str, the task is to check whether the string contains two non-overlapping sub-strings s1 = “geek” and s2 = “keeg” such that… Read More »

Given a string str of lowercase alphabets, the task is to find all distinct palindromic sub-strings of the given string. Examples: Input: str = “abaaa”… Read More »

Given a binary string str. The task is to find the smallest positive integer C such that the binary string can be cut into C… Read More »

Given three strings str, A and B. The task is to check whether str = A + B or str = B + A where… Read More »

Given a string of lowercase, find the length of the longest substring that does not contain any palindrome as a substring. Examples: Input : str… Read More »

Given a binary string str. For n-contiguous 1s the score is updated as score = score + n2 and for n-contiguous 0s, the score is… Read More »