An easy task, even no using of DP, just increase the t counter when different or increase both when same.
class Solution {
public:
bool isSubsequence(string s, string t) {
int i=0,j=0;
while(j<t.length()){
if(s[i]==t[j]){
i++;
j++;
}
else
j++;
}
if(i==s.length())
return true;
else
return false;
}
};