class Solution {
public:
bool isSubsequence(string s, string t) {
int slow = 0;
int st = t.size();
int ss = s.size();
while (slow + ss <= st) {
int index = slow;
int fast = 0;
while (fast < ss && index < st) {
if (s[fast] == t[index++]) {
++fast;
}
}
if (fast == ss) {
return true;
}
slow++;
}
return false;
}
};