Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 372 Bytes

8.md

File metadata and controls

30 lines (20 loc) · 372 Bytes

8 Palindrome Number

Description

link


Solution

  • See code

Code

O(n)

class Solution:
    def isPalindrome(self, x):
        """
        :type x: int
        :rtype: bool
        """
        if str(x) == str(x)[::-1]:
            return True
        
        return False