I need help writing a C++ boolean function that uses stacks torecognize if a string is a palindrome using three stacks.
using nanespace std; bool isPalindrone(string) s void rmPuneSpaces (string&) int main) atring str; while (getline(cin, str)) s (str) cout <is” if (isPalindrome(str)) cout <“not” cout <“a palindrone” < endl; return EXIT SUCCESS void rmPuncSpaces (atring& str) int i; 21 string wsPunct; sa string::size.type idx; // whitespace & punctuation a for (i-0; i<128; i) if (isspace()ispunct (i)) wePuncti Figure 1. /usr/local/2336/src/lab39main-C
OR
OR