Problem 60853. Check if a Number is a Palindrome Without Converting to String

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

70.59% Correct | 29.41% Incorrect
Last Solution submitted on Sep 18, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers11

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!