Practice Append Characters to String to Make Subsequence
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
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.
Source: Append Characters to String to Make Subsequence on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
s = "coaching", t = "coding"
4
# Example 2
s = "abcde", t = "a"
0
# Example 3
s = "z", t = "abcde"
5
Constraints
Related LeetCode Problems
Practice more problems similar to Append Characters to String to Make Subsequence.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.