LeetCode 9, Easy. Topics: Math. View on LeetCode.
Generate this problem as a practice environment: tested reference solution, 16 parametrized pytest cases, and a playground notebook:
Problem
Given an integer x, return true if x is a palindrome, and false otherwise.
Examples
Constraints
Follow up: Could you solve it without converting the integer to a string?
Solution
Reference implementation from solution.py on GitHub, full suite in test_solution.py:
Complexity
Grind, NeetCode All. Last modified on September 7, 2026