Two PointersEasy

Valid Palindrome

Keep only the letters and digits of s, ignore upper and lower case, and return true if what's left reads the same forwards and backwards.

Example 1s = "No lemon, no melon" → true
Example 2s = "race a car" → false
Example 3s = " " → trueNothing is left, and an empty string reads the same both ways.
1 ≤ length ≤ 2·10⁵ · printable ASCII

Hints

0 of 3 open
Hint 2 · the patternHint 3 · the key line