You are viewing a single comment's thread. Return to all comments →
C++
string funnyString(string s) { int j = s.length() - 2; for(int i = 1; i < s.length(); i++){ if(abs(s[i] - s[i-1]) != abs(s[j] - s[j+1])) return "Not Funny"; j--; } return "Funny"; }
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 →
C++