Subsequence Strings
Given two lowercase alphabet strings s1 and s2, determine if s1 is a subsequence of s2.
Constraints
n ≤ 100,000wherenis the length ofs1m ≤ 100,000wheremis the length ofs2
https://binarysearch.com/problems/Subsequence-Strings
Examples
Example 1
Input
- s1 =
ppl - s2 =
apple
Output
- answer =
True
Example 2
Input
- s1 =
ale - s2 =
apple
Output
- answer =
True
Example 3
Input
- s1 =
elppa - s2 =
apple
Output
- answer =
False
Leave a comment