## Check if string can be made lexicographically smaller by reversing any substring

Given a string S, the task is to check if we can make the string lexicographically smaller by reversing any sub-string of the given string.… Read More »

- Count distinct substrings that contain some characters at most k times
- Count the number of vowels occurring in all the substrings of given string
- Number of sub-strings which are anagram of any sub-string of another string
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Sub-strings of a string that are prefix of the same string
- Minimum length substring with exactly K distinct characters
- Sub-strings of length K containing same character
- Check if a string contains a palindromic sub-string of even length
- Minimum K such that every substring of length atleast K contains a character c
- K-th lexicographically smallest unique substring of a given string
- Count number of substrings with numeric value greater than X
- Find the count of palindromic sub-string of a string in its sorted form
- Substring Reverse Pattern
- Check if the given string is K-periodic
- Check if suffix and prefix of a string are palindromes
- Count of sub-strings that do not contain all the characters from the set {'a', 'b', 'c'} at the same time
- Maximum count of sub-strings of length K consisting of same characters
- Find the count of substrings in alphabetic order
- Find the count of sub-strings whose characters can be rearranged to form the given word
- Check if all the palindromic sub-strings are of odd length
- Length of the longest substring with no consecutive same letters
- Minimum steps to remove substring 010 from a binary string
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range
- Replace two substrings (of a string) with each other
- String which when repeated exactly K times gives a permutation of S
- Count the number of common divisors of the given strings
- Count of sub-strings that do not consist of the given character
- Python | Finding strings with given substring in list
- Python program to print the substrings that are prefix of the given string
- Generate all binary strings of length n with sub-string "01" appearing exactly twice

Given a string S, the task is to check if we can make the string lexicographically smaller by reversing any sub-string of the given string.… Read More »

Given a string str, a character c and an integer k > 0. The task is to find the number of sub-strings that contain the… Read More »

Given a string str and a character X. The task is to find the total number of sub-strings that contain the character X at least… Read More »

Given an integer N, the task is to find the length of the longest substring containing only 4’s from the first N characters of the… Read More »

Given a string str consisting of lowercase English letters and an integer K. The task is to find the minimum length of the sub-string whose… Read More »

Given a string str and an integer N, the task is to find the number of possible sub-strings of length N. Examples: Input: str =… Read More »

Given a string str and a character c. The task is to find the number of sub-strings that do not consist of the character c.… Read More »

Given a string S. The task is to count the non-overlapping pairs of palindromic sub-strings S1 and S2 such that the strings should be S1[L1…R1]… Read More »

Given a string str, the task is to find the length of the longest sub-string which does not have any pair of consecutive same characters.… Read More »

Given a string str, the task is to find the count of all the sub-strings of length four whose characters can be rearranged to form… Read More »

Given an integer N, the task is to generate all possible binary strings of length N which contain “01” as the sub-string exactly twice. Examples:… Read More »

Given a string str consisting only of the characters ‘a’, ‘b’ and ‘c’, find the number of sub-strings that do not contain all the three… Read More »

Given a string S and a range [L, R]. The task is to find the number of ways in which the sub-string in the range… Read More »

Every state is represented by string of length 2. For example DL is used for Delhi, HP for Himachal Pradesh, UP for Uttar Pradesh, PB… Read More »

Given a string str and an integer K, the task is to check whether the given string is K-periodic. A string is k-periodic if the… Read More »