Question: Please use the starter file as a hint file Write a program that uses a stack to test input strings to determine whether they are

Please use the starter file as a hint file
Write a program that uses a stack to test input strings to determine whether they are palindromes. A palindrome is a sequence of characters that reads the same as the sequence in reverse; for example, noon.
Notes for Problem1
Be sure to reuse your starter file for the
arraystack.py and
linkedstack.py files.
In the
palindrome.py file, complete the following:
Read the characters from an input string using an ArrayStack
Returns True if string is a palindrome or False otherwise.
To test your program run the main method in the
palindrome.py file.
2. Reverse a String using Stack - Given a string, reverse it using stack. Example:
Input: str = "GeeksQuiz"
Output: ziuQskeeG
Input: str =abc
Output: cba
Notes for Problem 2
Create an empty stack and push all the characters from the string into it. Then pop each character one by one from the stack and put them back into the input string starting from the 0'th index. As we all know, stacks work on the principle of first in, last out. After popping all the elements and placing them back to string, the formed string would be reversed.
Create an empty stack.
One by one push all characters of string to stack.
 Please use the starter file as a hint file Write a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!