Question: Write a boolean function, isPalindrome. The function has one parameter - a string. The function declares two local variables, a stack and a queue. The
Write a boolean function, isPalindrome. The function has one parameter - a string. The function declares two local variables, a stack and a queue. The function changes each upper case letter of its parameter to lower case and places each letter of its parameter both in a queue and onto a stack. The function uses the stack and queue to determine whether the string is a palindrome or not. The function returns true if the string is a palindrome and false if the string is not a palindrome.
A palindrome is a set of letters or digits that is the same whether read forward or backward. Spaces and punctuation are ignored in determining whether a string is or is not a palindrome.
Palindromes
Able was I 'ere I saw Elba
Pull up if I pull up.
A man, a plan, a canal, Panama!
Madam, I'm Adam
c++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
