8 lines
153 B
C++
8 lines
153 B
C++
|
|
#include <string>
|
||
|
|
#include <algorithm>
|
||
|
|
|
||
|
|
bool is_palindrome(std::string const& s)
|
||
|
|
{
|
||
|
|
return std::equal(s.begin(), s.begin()+s.length()/2, s.rbegin());
|
||
|
|
}
|