Leetcode判断子序列C++判断子序列函数模块:

bool judge (string a,string t)

int a=b=0;
while (a<s.size()&&b<t.size())
{
if (s[a]t[b])
{
++a;
++b;
}
else
++b;
};
return a
s.size();/返回true或false/
}

相关文章: