Question: Write a complete C++ program to check whether the string input is similar when it reads the same backwards as forwards using queue algorithms

Write a complete C++ program to check whether the string input is

Write a complete C++ program to check whether the string input is similar when it reads the same backwards as forwards using queue algorithms based on the instructions given. In the class ADTqueue, write all functions such as empty(), full(), append(...) and serve(). In the main() function: Get input string from user and check the length of the string. Call an append(...) function to add the letter into the queue. Repeat the process until all letter has been stored in the queue. Call a function serve() and store the letter to the new variable string. Repeat the process until the queue is empty. Compare the inputs string. If the strings are the same then display the message "it is same". Repeat this process if user wish to continue. Sample Output: Enter a word [Letter must be in lowercase]: pop pop is same Do you want to continue : Y Enter a word (Letter must be in lowercase]: peter peter is NOT same. Do you want to continue: Y Enter a word [Letter must be in lowercase]: madam madam is same Do you want to continue : Y Enter a word [Letter must be in lowercase]: rotator rotator is same Do you want to continue : Y Enter a word [Letter must be in lowercase]: door door is NOT same Do you want to continue : Y Enter a word [Letter must be in lowercase]: reviver reviver is same Do you want to continue : N

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a complete C program that implements the described functionality using a queue algorithm cpp i... View full answer

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 Programming Questions!