You are viewing a single comment's thread. Return to all comments →
public static String hackerrankInString(String s) { String str = "hackerrank"; for(int i = 0; i < str.length(); i++) { int index = s.indexOf(str.charAt(i)); if(index == -1) return "NO"; s = s.substring(index+1); } return "YES"; }
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 →