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 as.size();/返回true或false/ }
相關文章
相關標籤/搜索