Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

(This question is a variation of the LeetCode question 392. Is Subsequence. If you haven't completed that question yet, it is recommended to solve it first.)

You are given two strings, s and t, each representing a space-delimited sentence. It is guaranteed that the words in t form a subsequence of the words in s, meaning they appear in the same order but do not need to be adjacent.

Test Cases
Input
Output
Expected