Description
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 palindrome while 123 is not.
My Solution
class Solution:
def isPalindrome(self, x: int) -> bool:
return str(x) == str(x)[::-1]
'Algorithm > Daily Coding Tests Challenge' 카테고리의 다른 글
[프로그래머스] level2. 124 나라의 숫자 (0) | 2021.08.30 |
---|---|
[Leetcode] Easy : Roman to Integer (0) | 2021.08.30 |
[Leetcode] Easy : Reverse integer (0) | 2021.08.20 |
[프로그래머스 코딩테스트] lv1. 2주차 : 상호 평가 (0) | 2021.08.18 |
[프로그래머스 코딩테스트] lv1. 행렬의 덧셈 (0) | 2021.08.18 |