You are viewing a single comment's thread. Return to all comments →
int theLoveLetterMystery(char* s) { int i=0,j=strlen(s)-1,count=0; while(i<j){ if(s[i]!=s[j]) count +=abs(s[i]-s[j]); i++; j--; } return count; }
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 →
Simple C Solution