update project structure

This commit is contained in:
2024-06-20 06:29:07 +08:00
parent 17b4ef8970
commit fdaa94a0fa
49 changed files with 35 additions and 4 deletions

11
leetcode_py/9.py Normal file
View File

@@ -0,0 +1,11 @@
# Given an integer, return true if x is a palindrome
class Solution:
def isPalindrome(self, x: int) -> bool:
if x < 0:
return False
str_x = str(x)
inv_str_x = str_x[::-1]
int_inv_str_x = int(inv_str_x)
return x == int_inv_str_x