Skip to content

Tag Archives: substring

Given a string S of length N consisting of digits from ‘0’ to ‘9’ .The task is to determine the total number of possible ways… Read More
Given a string S, the task is to find out the length of the smallest substring of S that needs to be rearranged so that… Read More
Given two strings X and Y, the task is to find the length of the longest common substring.  Examples: Input: X = “GeeksforGeeks”, y =… Read More
Given a binary string consisting of ‘0’ and ‘1’ only and an integer K, the task is to minimize the string as far as possible… Read More
Given a binary string S, the task is to count the substrings having the number of 0s and 1s in the ratio of X :… Read More
Given a string S consisting of only lowercase English letters of length N, the task is to find the count of substrings such that each… Read More
What is String? Strings are considered a data type in general and are typically represented as arrays of bytes (or words) that store a sequence… Read More
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

Start Your Coding Journey Now!