Problem statement

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

Solution

Just check it.

Complexity

It is O(n) for time and space.

Code

class Solution:
    def solve(self, s):
        return s == s[::-1]