Answers for "bool checkPalindrome(string inputString) { return inputString == string(inputString.rbegin(), inputString.rend()); }"

0

bool checkPalindrome(string inputString) { return inputString == string(inputString.rbegin(), inputString.rend()); }

#include <iostream>
#include <string>

using namespace std;
bool checkPalindrome(string);
int main()
{
    string inputString = "palindrom";
    cout << checkPalindrome(inputString);
	return 0;
}

bool checkPalindrome(std::string inputString)
{
   return (inputString == string(inputString.rbegin(), inputString.rend()));
}
Posted by: Guest on July-13-2020

Code answers related to "bool checkPalindrome(string inputString) { return inputString == string(inputString.rbegin(), inputString.rend()); }"

Browse Popular Code Answers by Language