## Count pairs of non-overlapping palindromic sub-strings of the given string

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 »

- Number of substrings that start with "geeks" and end with "for"
- Count number of substrings of a string consisting of same characters
- Count all substrings having character K
- Minimum number of substrings the given string can be splitted into that satisfy the given conditions
- Check if string can be rearranged so that every Odd length Substring is Palindrome
- Reverse the given string in the range [L, R]
- Count number of binary strings such that there is no substring of length greater than or equal to 3 with all 1's
- Largest substring of str2 which is a prefix of str1
- Longest substring such that no three consecutive characters are same
- Contiguous unique substrings with the given length L
- Find the longest sub-string which is prefix, suffix and also present inside the string | Set 2

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 »

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 3 strings S, A and B. The task is to replace every sub-string of S equal to A with B and every sub-string of… Read More »

Given two strings a and b, the task is to count the number of common divisors of both the strings. A string s is a… Read More »

Given a string str and an integer k. The task is to count the occurrences of sub-strings of length k that consist of the same… Read More »

Given a integer k and a sting str, the task is to count the number of distinct sub-strings such that each sub-string does not contain… Read More »

Given a string S containing lowercase latin letters. A character c is called K-amazing if every substring of S with length atleast K contains this… Read More »

The classical problem that can be handled quite easily by Python and has been also dealt with many times is finding if a string is… Read More »