You are viewing a single comment's thread. Return to all comments →
C++ solution ->
string funnyString(string s) { for(auto i=begin(s),j=end(s)-1; i!=end(s)-1; i++,j--){ if(abs(((int)*i) - ((int)*(i+1))) != abs(((int)*j) - ((int)*(j-1)))){ return "Not Funny"; } } return "Funny"; }
Funny String
You are viewing a single comment's thread. Return to all comments →
C++ solution ->