Problem
A string is considered a palindrome if it reads the same when it's reversed. For example, the string racecar
is a palindrome that reads the same in both forward and backward directions.
Write a method is_palindrome?
that takes a string as a parameter and returns true
if the passed string is a palindrome and false
otherwise.
Get hands-on with 1400+ tech skills courses.