less than 1 minute read

Given a string s, return whether it is a palindrome.

Constraints

  • n ≤ 100,000 where n is the length of s

https://binarysearch.com/problems/Check-Palindrome

Examples

Example 1

Input

  • s = evilolive

Output

  • answer = True

Example 2

Input

  • s = racecar

Output

  • answer = True

Example 3

Input

  • s = palindrome

Output

  • answer = False

Solution

Leave a comment