Palindrome NumberPalindrome Number
0 0
Read Time:21 Second

Given an integer x, return true if x is palindrome integer.

An integer is a palindrome when it reads the same backward as forward.

  • For example, 121 is a palindrome while 123 is not.

Python Solution

class Solution(object):
    def isPalindrome(self, x):
        """
        :type x: int
        :rtype: bool
        """
        reverse=str(x)[::-1]
        print(reverse)
        if str(x)==reverse:
            return True
        return False
        
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

About Author

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “Palindrome Number

  1. Picture this – 3 am in the morning, I had a line of fiends stretched around the corner of my block. It was in the freezing middle of January but they had camped out all night, jumping-ready to buy like there was a sale on Jordans. If you were 16 years old, in my shoes, you’d do anything to survive, right? I got good news though; I MADE IT OUT OF THE HOOD, with nothing but a laptop and an internet connection. I’m not special or lucky in any way. If I, as a convicted felon that used to scream “Free Harlem” around my block until my throat was sore, could find a way to generate a stable, consistent, reliable income online, ANYONE can! If you’re interested in legitimate, stress-free side hustles that can bring in $3,500/week, I set up a site you can use: https://incomecommunity.com

Leave a Reply

Your email address will not be published. Required fields are marked *