← All problems

Valid Palindrome

EasyTwo Pointers

Given a string, return true if it reads the same forward and backward, considering only alphanumeric characters and ignoring case.

Examples

Input: "A man, a plan, a canal: Panama"
Output: true
Input: "race a car"
Output: false

Hints

Solution

Language:
Loading editor…
Output0 lines
Run your code to see output here.
Click Run all tests to check your solution against 5 test cases.