You are given two strings, s and t. You have to find out whether s is a subsequence of t.
A subsequence of a string is made by deleting some of its characters (maybe none, maybe all) while the remaining characters keep their order. For example, "ace" is a subsequence of "abcde", but "aec" is not.
Answer true when you can get s by deleting characters from t. Answer false when you cannot.
Examples
Example 1:
Input: s = "net", t = "nineteen"
Output: true
Explanation: Pick n (position 0), e (position 3) and t (position 4) in order.
Example 2:
Input: s = "cat", t = "tacit"
Output: false
Explanation: After the "c" in "tacit" there is no "a", so it cannot be matched.
Example 3:
Input: s = "", t = "xyz"
Output: true
Explanation: An empty string is a subsequence of every string.