Valid Palindrome
We'll cover the following
Statement#
Write a function that takes a string, s, as an input and determines whether or not it is a palindrome.
Note: A palindrome is a word, phrase, or sequence of characters that reads the same backward as forward.
Constraints:
-
s.length - The string
swill contain English uppercase and lowercase letters, digits, and spaces.
Examples#
1 of 2
2 of 2
Understand the problem#
Let’s take a moment to make sure you've correctly understood the problem. The quiz below helps you check if you're solving the correct problem:
Valid Palindrome
“abab” is a palindrome.
True
False
Figure it out!#
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding on how to solve this problem.
Try it yourself#
Implement your solution in main.py in the following coding playground. We have provided a useful code template in the other file that you can use to solve this problem.
Two Pointers: Introduction
Solution: Valid Palindrome