Palindrome
Ruby Strings Public
Ruby
Ruby is a dynamic, reflective, object-oriented, general-purpose programming language. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.
Strings
The string data structure is used to represent text. It is one of the most commonly used data structures. Therefore, every programmer should be skilled at string manipulation.
Public
Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.
A palindrome is a word that reads the same backward or forward.
Write a function that checks if a given word is a palindrome. Character case should be ignored.
For example, is_palindrome("Deleveled") should return true as character case should be ignored, resulting in "deleveled", which is a palindrome since it reads the same backward and forward.
Ruby 2.5.1
- Example case: Wrong answer
- Lowercase words: Wrong answer
- Various words: Wrong answer