You are viewing a single comment's thread. Return to all comments →
int theLoveLetterMystery(string s) { int modifs = 0, lft = 0, rgt = s.size()-1; while (lft<rgt) { int indx = s[lft]<=s[rgt]? rgt : lft; while (s[lft]!=s[rgt]) { s[indx]--; modifs++; } lft++; rgt--; } return modifs; }
Seems like cookies are disabled on this browser, please enable them to open this website
The Love-Letter Mystery
You are viewing a single comment's thread. Return to all comments →