Is subsequence
Easystringtwo pointers
Return true if the letters of s appear in t in the same order (not necessarily adjacent).
Example 1
Input: s = "abc", t = "ahbgdc" Output: true
Example 2
Input: s = "axc", t = "ahbgdc" Output: false
Constraints
- 0 ≤ s.length ≤ 100
- 0 ≤ t.length ≤ 10⁴
- Lowercase letters
Submit checks your solution against 10 tests, including hidden ones.
/**
* @param {string} s
* @param {string} t
* @return {bool}
*/
function isSubsequence(s, t) {
}