Question: 5. Write an algorithm to check whether a given string is a palindrome. If a string reads the same backwards as forward (ignore the spaces,

5. Write an algorithm to check whether a given string is a palindrome. If a string reads the same backwards as forward (ignore the spaces, case not sensitive), we call the string as palindrome. For example, "madam" is a palindrome while "car" is not. Write your algorithm in pseudo code, then implement it in C++/Java. Your algorithm must involve explicit use of both a stack and a queue. Make sure to test your program with at least Was it a car or a cat I saw" and "cartrac". (6 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
