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:

  • 1≤1 \leq s.length ≤2×105\leq 2 \times 10^5
  • The string s will contain English uppercase and lowercase letters, digits, and spaces.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy