You are given a string text and a string pattern of length
You can insert either pattern[0] or pattern[1] at any index in text exactly once. The character may be inserted at the beginning, at the end, or between any existing characters of text.
Return the maximum number of times pattern can appear as a subsequence in the modified string.
A subsequence is a string that can be derived from another string by deleting zero or more characters without changing the relative order of the remaining characters.
Constraints:
text.length
pattern.length
text and pattern consist only of lowercase English letters.
You are given a string text and a string pattern of length
You can insert either pattern[0] or pattern[1] at any index in text exactly once. The character may be inserted at the beginning, at the end, or between any existing characters of text.
Return the maximum number of times pattern can appear as a subsequence in the modified string.
A subsequence is a string that can be derived from another string by deleting zero or more characters without changing the relative order of the remaining characters.
Constraints:
text.length
pattern.length
text and pattern consist only of lowercase English letters.