Two Pointers • Easy

Valid Palindrome

A phrase is a palindrome if, after converting all uppercase letters into lowercase and removing all non-alphanumeric characters, it reads the same forward and backward.

The Challenge

A phrase is a palindrome if, after converting all uppercase letters into lowercase and removing all non-alphanumeric characters, it reads the same forward and backward.

Difficulty Easy
Topic Two Pointers

Pro-tip: Clean the string first, then use two pointers to compare from both ends.

Solution.swift Tests.swift
Output
Ready to run.