Valid Palindrome — Two Pointers

Decide whether a text is a mirror of itself end to end, ignoring capital letters, punctuation and spacing.

Two Pointers · Easy

The problem

Given a string, say whether it reads the same both ways when you ignore case and anything that is not a letter or digit.

What to return

Constraints

Example

Input
s = "No lemon, no melon"
Output
true

Solve it

More in Two Pointers

All algorithm problems