Problem 45. Make a Palindrome Number

Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a reversed copy of itself.

  + 421

Let's try another.

  + 051

No, that didn't work, but what if we keep going?

  + 102

There, it became a palindrome again. Given a, return b = find_palindrome(a) such that b is the palindrome number that eventually results from repeated reversals and additions of a.


 Input  a = 150
 Output b is 303

Solution Stats

61.83% Correct | 38.17% Incorrect
Last Solution submitted on Jun 10, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers2318

Suggested Problems

More from this Author96

Problem Tags

Community Treasure Hunt

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

Start Hunting!