Question: A Palindrome is a string that reads the same forward and backward. For instance, mom, radar, level, noon, civic, etc. Write a program to read
A Palindrome is a string that reads the same forward and backward. For instance, mom, radar, level, noon, civic, etc. Write a program to read words from an input file and add it to a queue Q For each word in the Q use another queue, Qor more to verify whether the word is a palindrome or not. If the word is a palindrome, add it to the end of the queue Q Repeat it for all the words in the Q The resultant content in the queue need to be written to a file called outputPSQtxt For n words in the input file, the algorithm should work in time complexity of n or better.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
