#include #include #include #include #include #include #include bool isSubSequence(char str1[], char str2[], int m, int n); int main(){ int ls1=10; int q; scanf("%d",&q); for(int a0 = 0; a0 < q; a0++){ char* s = (char *)malloc(512000 * sizeof(char)); scanf("%s",s); int ls=strlen(s); char s1 [12]="hackerrank"; int ls1=10; bool flag=isSubSequence(s1, s, ls1, ls); if (flag){ printf("YES\n"); } else printf ("NO\n"); }// your code goes here return 0; } bool isSubSequence(char str1[], char str2[], int m, int n) { if (m == 0) return true; if (n == 0) return false; if (str1[m-1] == str2[n-1]) return isSubSequence(str1, str2, m-1, n-1); return isSubSequence(str1, str2, m, n-1); }