/*
* 392. 判断子序列
* https://leetcode-cn.com/problems/is-subsequence/
*/
/*
* 方法一: 双指针
*/
bool MyLeetCode::isSubsequence(string s, string t) {
if(s.length()==0 && t.length()==0)
return true;
for(int i=0, j=0; j < t.length(); j++){
if(s[i] == t[j])
i++;
if(i==s.length())
return true;
}
return false;
}