Cascadiq

Valid Palindrome

algorithm · Level 1 · 10 min

Description

Given a string s, return true if it is a palindrome, otherwise false. Ignore non-alphanumeric characters and case.

Requirements

  • Implement a function that takes a string s.
  • Return true if s is a palindrome (reads same forward and backward, ignoring non-alphanumeric and case), false otherwise.

Constraints

- `1 <= s.length <= 2 * 10^5` - `s` consists only of printable ASCII characters.

Deliverables

Return true or false.

Tags

StringTwo Pointers