Computers and Technology

Write a method named isPalindrome that accepts a string parameter and returns true if that string is a palindrome, or false if it is not a palindrome. For this problem, a palindrome is defined as a string that contains exactly the same sequence of characters forwards as backwards, case-insensitively. For example, "madam" or "racecar" are palindromes, so the call of isPalindrome("racecar") would return true. Spaces, punctuation, and any other characters should be treated the same as letters; so a multi-word string such as "dog god" could be a palindrome, as could a gibberish string such as "123 $$ 321". The empty string and all one-character strings are palindromes by our definition. Your code should ignore case, so a string like "Madam" or "RACEcar" would also count as palindromes.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:30, SKYBLUE1015
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
image
Computers and Technology, 22.06.2019 22:30, hmontalvo22
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, PresleyPie9452
George is working as a programming team lead. which statements correctly describe the skills that he requires?
Answers: 3
image
Computers and Technology, 25.06.2019 03:30, eamber646
Which task should happen during the planning stage of a project
Answers: 2
Do you know the correct answer?
Write a method named isPalindrome that accepts a string parameter and returns true if that string is...

Questions in other subjects:

Konu
Mathematics, 12.08.2019 21:10