Peeush Agarwal > Engineer. Learner. Builder.

I am a Machine Learning Engineer passionate about creating practical AI solutions using Machine Learning, NLP, Computer Vision, and Azure technologies. This space is where I document my projects, experiments, and insights as I grow in the world of data science.

View on GitHub

Valid Palindrome

Problem Statement

A phrase is considered a palindrome if, after converting all uppercase letters to lowercase and removing all non-alphanumeric characters, it reads the same forwards and backwards. Alphanumeric characters include both letters and numbers.

Given a string s, determine whether it is a palindrome. Return true if it is a palindrome, and false otherwise.

Examples

Example 1:

Example 2:

Example 3:

Constraints

Code Template

class Solution:
    def isPalindrome(self, s: str) -> bool:
        # Your code here
        pass

Solutions

Back to Problem List Back to Categories