int main() { char str1[20] ,str2[20] ; printf("enter string 1"); scanf("%s",str1); printf("enter string 2"); scanf("%s",str2); isSubSequence(str1, str2); return 0; }
bool isSubSetSequence(const list<set<S> >& s1, const list<set<S> >& s2) { if (s2.empty()) return true; typename list<set<S> >::const_iterator it2 = s2.begin(); for (typename list<set<S> >::const_iterator it1 = s1.begin(); it1 != s1.end(); ++it1) { if (isSubSequence(*it1, *it2)) { it2++; if (it2 == s2.end()) return true; } } return false; }