You are viewing a single comment's thread. Return to all comments →
Exactly , even i have thought in the same way. It do feels good haha.
THIS IS SIMPLE C CODE
int main(){ int q; scanf("%d",&q); char h[] = "hackerrank"; int i,j=0; for(int a0 = 0; a0 < q; a0++) { j=0; char* s = (char *)malloc(512000 * sizeof(char)); scanf("%s",s); for(i=0;i<strlen(s);i++) { if(h[j]==s[i]) { j++; } } if(j==10) printf("YES\n"); else printf("NO\n"); } return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
HackerRank in a String!
You are viewing a single comment's thread. Return to all comments →
Exactly , even i have thought in the same way. It do feels good haha.
THIS IS SIMPLE C CODE