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

21 Solutions

14 Solvers

Last Solution submitted on Jun 06, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers14

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!