You are viewing a single comment's thread. Return to all comments →
my solution, C++:
bool funny(string s) {
bool outp = true; for (int i=1, j=s.length()-2; i<s.length(), j>=0; i++, j--) { if ( abs(s[i]-s[i-1]) != abs(s[j]-s[j+1]) ) { return false; } } return outp;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Funny String
You are viewing a single comment's thread. Return to all comments →
my solution, C++:
bool funny(string s) {
}