Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing

Valid Palindrome

Python data engineering interview problem. Difficulty: intermediate. Pattern: Two Pointers. About 14 minutes. Part of the Pro drill bank.

Check palindrome ignoring non-alphanumeric and case. Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.

Implement is_palindrome(s: str) -> bool comparing only alphanumeric characters, case-insensitive.

Constraints

  • Ignore non-alphanumeric characters.
  • Case-insensitive.

Examples

Input: is_palindrome('A man, a plan, a canal: Panama') Output: True Alnum letters form a palindrome.

Topics: lakebench, python, palindrome, strings.

More Python interview questions · All interview problems · Learn data engineering

intermediate

Valid Palindrome

Interview-style drill: Check palindrome ignoring non-alphanumeric and case.

Implement `is_palindrome(s: str) -> bool` comparing only alphanumeric characters, case-insensitive. Example: `"A man, a plan, a canal: Panama"` → `True`. Keep the harness.