Skip to content

Tag Archives: substring

Given two strings S and T of length N and M respectively, the task is to check if the string S can be converted to… Read More
Given a binary string S, the task is to convert the given string S to its lexicographic maximum form by reversing substrings having an even… Read More
Given two strings S1 and S2 of length N and M respectively, consisting of lowercase letters, the task is to find the minimum length to… Read More
Given two strings S1 and S2 of length N and M respectively, the task is to find the maximum value of times the string S2… Read More
Given two integers N and K (K ≤ N), the task is to obtain a string of length N such that maximum length of a… Read More
Given two strings S and T of length N and M respectively, the task is to count the number of substrings of S that contains… Read More
Given two strings X and Y of length N, the task is to check if both the strings can be made equal by reversing any… Read More
Given two strings str1 and str2, the task is to count the maximum consecutive occurrences of the string str2 in the string str1. Examples: Input:… Read More
Given a binary string str of size N, the task is to minimize the length of given binary string by removing even length substrings consisting… Read More
Given two strings S and T, the task is to count the number of substrings of S that contains string T in it as a… Read More
Given a string str, the task is to find the maximum count of common non-repeating characters that can be obtained by partitioning the given string… Read More
Given a binary string S of length N, the task is to find the longest substring consisting of ‘1’s only present in the string after… Read More
Given two strings, str1 and str2 of length N, the task is to convert the string str1 to string str2 by selecting a substring and… Read More
Given string str consisting of lowercase letters, the task is to find the maximum number of non-overlapping substrings such that each substring contains all occurrences… Read More