Skip to content

Tag Archives: substring

Given a binary string S of length N, the task is to find the number of pairs of integers [L, R] 1 ≤ L <… Read More
Given a target string S consisting of lowercase alphabets, the task is to make this string by performing some operation on an empty string such… Read More
Given a string S and a list of strings subs[] that stores the substrings of S and all the substrings are present only once, the… Read More
Given a string S on which you need to perform Q replace operations.Each replacement operation has 3 parameters: a starting index i, a source word… Read More
Given a binary string S of length N and an integer K, the task is to find the maximum number of non-overlapping substrings that can… Read More
Given string str of size N and two integers M and K (N is divisible by M), the task is to find the Kth non-overlapping… Read More
Given a string S of length N consisting of numbers from(0-9) and also two numbers, one is even (say  X)and one is odd (say Y),… Read More
Given a string S of length N, the task is to remove the longest prefix of the string which has at least one duplicate substring… Read More
Given a binary string str of size N, the task is to calculate the bitwise XOR of all substrings of str. Examples: Input: str =… Read More
Given a binary string S of length N, the task is to minimize the count of operations required to find a binary string T of… Read More
Given a string S of length N, the task is to find the length of the longest substring X of the string S such that:… Read More
Given a binary string S of length N, the task is to find the longest substring with at most X number of 0’s and Y… Read More
Given a string S. Find the longest Substring that starts with character C1, ends with character C3 and has at least one character C2 in… Read More
Given a string str of size N, the task is to check whether the given string is K-periodic, for all Ks in range [1, N].… Read More
Given a string S and an integer K, the task is to find the lexicographically smallest string possible after reversing any substring of any length… Read More

Start Your Coding Journey Now!