Solution :
check_palindrome
lower_
_string
string
_lower()
Let stack = new Stack()
Let queue = new Queue();
for each character c in lower_case_string:
stack.push(c);
queue.enqueue(c);
let isPalindrome = true;
while queue is not empty {
if (queue.remove().equals(stack.pop())) {
continue;
} else {
isPalindrome=false;
break while loop;
}
}
return isPalindrome
Input = aabb
output = true
input =abcd
output = false