Problem
Ask
Submissions

Problem: Append Characters to String to Make Subsequence

Medium
30 min
Explore the approach to compute the minimum characters needed to append to a source string to ensure the target string is a subsequence. Understand subsequence properties and practice solving this with two-pointer techniques to improve problem-solving skills for coding interviews.

Statement

You’re given two strings, source and target, made up of lowercase English letters. Your task is to determine the minimum number of characters that must be appended to the end of the source so that the target becomes a subsequence of the resulting string.

Note: A subsequence is formed by deleting zero or more characters from a string without changing the order of the remaining characters.

Constraints:

  • 11 \leq source.length, target.length 103\leq 10^3

  • source and target consist only of lowercase English letters.

Problem
Ask
Submissions

Problem: Append Characters to String to Make Subsequence

Medium
30 min
Explore the approach to compute the minimum characters needed to append to a source string to ensure the target string is a subsequence. Understand subsequence properties and practice solving this with two-pointer techniques to improve problem-solving skills for coding interviews.

Statement

You’re given two strings, source and target, made up of lowercase English letters. Your task is to determine the minimum number of characters that must be appended to the end of the source so that the target becomes a subsequence of the resulting string.

Note: A subsequence is formed by deleting zero or more characters from a string without changing the order of the remaining characters.

Constraints:

  • 11 \leq source.length, target.length 103\leq 10^3

  • source and target consist only of lowercase English letters.