I want to write a method to determine if a given string is a palindrome. E.g. "Madam I'm Adam", or "A man, a plan, a canal, Panama".
The prototype for the function is:
bool is_palindrome(char const * str)
I have a simple logic to check for equality by moving forward & backward from extreme ends of the string.
But, i would like to know how many efficient ways to do this ? All ideas welcome from C++ gurus..