
Problems:
A palindrome is a sequence of characters whose reversal gives the same sequence.
Examples are “radar” and “noon”. Using a stack and a queue, write an
reads a string, and determines if the string contains a palindrome/s. Display the
palindrome/s found. Implement your algorithm in Java or C++.
Note:
➢ convert your string to lowercase
➢ do not use strings or arrays except when implementing the stack and the queue
and for storage of your input string
➢ do not use any built-in method to determine if a word is a palindrome
Sample runs:
1. Input : madam
Output : palindrome/s in the string : madam
2. input : I love madam ABBA
Output : palindrome/s in the string : madam abba
3. input : the quick brown fox
Output : palindrome/s in the string : no palindrome

Step by stepSolved in 2 steps

- C++Create 1 million integers randomly and store them in an array. Find the 100 smallest integers and print them. Use a Priority Queue implemented by Heap using array, and print the execution time too.arrow_forwardJavaarrow_forwardJava Design and draw a method called check() to check if characters in a linked list is a palindrome or not e.g "mom" or "radar" or "racecar. spaces are ignored, we can call the spaces the “separator”. The method should receive the separator as a variable which should be equal to “null” when no separator is used.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





