Write a function that checks if a given positive integer is a palindrome without converting the number to a string or using string functions.
A number is a palindrome if it reads the same forward and backward (e.g., 121, 12321, 454). Your function should return true if the number is a palindrome and false otherwise.
Constraints:
- Input is a positive integer n (1 ≤ n ≤ 1e9)
- Do not use string conversion (num2str, str2num, etc.)
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers12
Suggested Problems
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!