2486. Append Characters to String to Make Subsequence
Medium
You are given two strings s
and t
consisting of only lowercase English letters.
Return the minimum number of characters that need to be appended to the end of s
so that t
becomes a subsequence of s
.
A subsequence is a string that can be derived from another string by deleting some or no characters without changing the order of the remaining characters.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= s.length, t.length <= 105
s
andt
consist only of lowercase English letters.
解題
Last updated