You are viewing a single comment's thread. Return to all comments →
C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star:) )
std::string funnyString(std::string const & _str) { auto fIt = _str.cbegin(); auto rIt = _str.crbegin(); while(fIt != _str.cend() - 1){ if(::abs(*fIt - *++fIt) != ::abs(*rIt - *++rIt)){ return "Not Funny"; } } 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++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star:) )