You are given two strings string1 and string2. Your task is to find length of longest consecutive occurrences of second string that occurs in first string. Examples: Input: string1="AAACBBAAAA", string2="A" Output: 4 ...read more
Substring
3 postsGiven two strings string1 and string2, the task is to find the smallest substring in string1 containing all characters of string2. Examples : Input: string = “Cplusplus is the best”, pattern = ...read more
Given a string str. The task is to check whether this string can be splitted into two strings X and Y such that Y is a substring of X X + Y ...read more