let's solve more as a compensation

This commit is contained in:
2024-09-16 22:08:39 +03:00
parent aa5073c881
commit f7c7d36031
3 changed files with 63 additions and 0 deletions

13
easy/palindrome-number.py Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/python
# yigid balaban <fyb@fybx.dev>
# neetcode 2024
# easy / palindrome number
def solution(x: int) -> bool:
return str(x) == str(x)[::-1]
print(solution(121) == True)
print(solution(0) == True)
print(solution(-121) == False)
print(solution(10) == False)