## Queries to find the last non-repeating character in the sub-string of a given string

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 »

- Minimum length substring with exactly K distinct characters
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Count substrings that contain all vowels | SET 2
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Count of substrings which contains a given character K times
- Number of sub-strings that contain the given character exactly k times
- Maximum length palindromic substring such that it starts and ends with given char
- Queries to find the first non-repeating character in the sub-string of a string
- Minimum number of sub-strings of a string such that all are power of 5
- Queries to check if string B exists as substring in string A
- Count number of distinct substrings of a given length
- Length of the longest substring that do not contain any palindrome
- Maximum count of sub-strings of length K consisting of same characters
- Find distinct characters in distinct substrings of a string
- Length of the longest substring with no consecutive same letters
- Count of non-overlapping sub-strings "101" and "010" in the given binary string
- Queries to find the last non-repeating character in the sub-string of a given string
- Count the number of common divisors of the given strings
- Replace two substrings (of a string) with each other
- Check if the given string is K-periodic
- Find the count of sub-strings whose characters can be rearranged to form the given word
- Longest substring of only 4's from the first N characters of the infinite string
- 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 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 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 »

Given a string str and Q queries. Every query consists of a number X, the task is to print the Xth lexicographically smallest sub-string of… Read More »

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 »