#include using namespace std; // Returns true if str1[] is a subsequence of str2[]. m is // length of str1 and n is length of str2 bool isSubSequence(char str1[], char str2[], int m, int n) { int j = 0; // For index of str1 (or subsequence // Traverse str2 and str1, and compare current character // of str2 with first unmatched char of str1, if matched // then move ahead in str1 for (int i=0; i>t; while(t--){ char str2[10000]; char str1[] = "hackerrank"; cin>>str2; int m = strlen(str1); int n = strlen(str2); isSubSequence(str1, str2, m, n)? cout << "YES ": cout << "NO"; cout<