Palindromes - Blanks Ignored - Java
Not what you're looking for?
A palindrome is a string that will spell the same way forward and backward. Some examples of palindromes are "radar", "able was I ere I saw elba" and (if blanks are ignored) "a man a plan a canal panama". Write a recursive method testPalindrome that returns boolean value true if the string stored in the array is a palindrome and false otherwise. The method should ignore spaces and punctuation in the string. [Hint: Use Sting method toCharArray, which takes no arguments, to get a char array containing the characters in the String. Then pass the array to a method testPalindrome].
Purchase this Solution
Solution Summary
The solution writes a recursive method testPalindrome that returns boolean value true if the string stored in the array is a palindrome and false otherwise (done in Java).
Purchase this Solution
Free BrainMass Quizzes
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Javscript Basics
Quiz on basics of javascript programming language.
C# variables and classes
This quiz contains questions about C# classes and variables.