You are viewing a single comment's thread. Return to all comments →
This is not as efficientas it scans to the end of the array. One should insted of j++ say
if (++j == sttr.length()) 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 →
This is not as efficientas it scans to the end of the array. One should insted of j++ say
if (++j == sttr.length()) return "YES";