Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Find the longest prefix of t that is a subsequence of s.
Use two variables to keep track of your location in s and t. If the characters match, increment both variables. Otherwise, only increment the variable for s.
The remaining characters in t must be appended to the end of s.