Question: write a java program using NO arrays and only stacks and queues to accomplish the above requirements: This assignment is to utilize the author's stack

write a java program using NO arrays and only stacks and queues to accomplish the above requirements:

This assignment is to utilize the author's stack code and queue code from chapter 4 to determine if a string is a palindrome (or not). Note that an analysis of your two solutions is required to be compared to the algorithm given in this document. A palindrome is a word that is spelled the same forwards and backwards. Assume that the phrase has been stripped of punctuation and is all the same case. For example, "A man, a plan, a canal. Panama!" is entered as "amanaplanacanalpanama" Data Structure Requirements ( 40%) 1. No arrays are used in main, isPalindromeSTACK, and isPalindromeQUEUE. 2. String data types are permitted 3. Modified and used author's stack code Pop, Push, and isEmpty used 4. Modified and used author's queue code - Algorithm Requirements (40\%) 1. Works! correctly identifies palindromes - Analysis Requirements (20%) Use documentation for the lines in isPalindromeSTACK and isPalindromeQUEUE to show the running time of the code Analyze the following algorithm and compare the running time of the three solutions (i.e, code below, your isPalindromeSTACK and your isPalindromeQUEUE) for i from to n/2 do if a[i]1=a[ni] exit i!=n/2 if returnfalseelse return true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
