Leetcode Problem 9: Palindrome Number // Easy to understand solution (Python)

preview_player
Показать описание
🚀 Today we're going to solve problem 9 on Leetcode "Palindrome Number" using PYTHON. This is a great problem to know how to solve because palindromes are common in coding interviews. There's an "easy" way to solve this one, but I'm going to show you a more challenging way to think through the problem that will impress your interviewers.

🧑‍💻 IF YOU'RE NEW HERE: My name is Shane and I'm a Software Engineer. Introduce yourself in the comment section and let's code together! 👋

✨ Subscribe to my channel for more Leetcode solutions and Python tutorials!
Рекомендации по теме
Комментарии
Автор

I dont know what the problem with my code not working
class Solution:
def isPalindrome(self, x: int) -> bool:
return 0>x
b=0
y=x
while y>0:
a=x%10
b+=a
b*=10
y=y//10
return y==x

sharabugnanesh
welcome to shbcf.ru