function hackerrankInString(s) { // Write your code here let i=0; let j=0; let matchStr = "hackerrank"; let isMatchFound = "NO"; while(i < s.length){ if(s[i] ===matchStr[j]){ i++; j++; }else{ i++; } if(j === matchStr.length){ isMatchFound = "YES"; } } return isMatchFound; }
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)