Palindrome Check

Medium20–30 pts depending on language · +25 for learning a language that's new to you

A palindrome reads the same forwards and backwards, like racecar. Return true if text is a palindrome when you ignore capital letters, spaces and punctuation (only letters and digits count). Otherwise return false.

Text with no letters or digits at all (including empty text) counts as a palindrome.

text uses plain English characters and can be up to 20,000 characters long.

Examples

Input: isPalindrome("racecar")

Output: true

Input: isPalindrome("A man, a plan, a canal: Panama")

Output: true

Input: isPalindrome("hello")

Output: false

Your solution is checked against 3 example tests and 10 hidden tests (edge cases and bigger inputs).

Solved by 2 members

  1. 1Isaac M.Rust · Oct 19
  2. 2RainePython 3 · Oct 21
Full leaderboard →

Your Solution

Languages you don't learn in class are worth more: C++ 1.25×, JavaScript, TypeScript, C, Rust and Go 1.5×. Your first solve in a language unlocks its "Learned" achievement: +25 for learning it.

Loading editor...

IntelliSense: connecting…

Run Code checks the example tests. Submit runs every test, including hidden ones.