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 not contain any white space and will only consist of ASCII characters(digits and letters).

Create a free account to view this lesson.

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