MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

**Description**

Given an integer *X*, determine if it is a palindrome number. That is, *X* is equal to the *X* with the digits reversed (with no leading 0s). The twist is that your code cannot use any function or variable name that has either "str", "eval", "flip" or "printf" in it.

**Example**

X = 123454321; Y = true;

X = 1234; Y = false;

98 correct solutions
122 incorrect solutions

Last solution submitted on Apr 03, 2015

3 players like this problem

1 Comment

Paul Berglund
on 17 Sep 2013

This will fail to detect certain palindromes which contain zero e.g. 10101 however the test suite doesn't (yet) contain any such.

1 Comment

Nikolai
on 26 Feb 2012

There's something strange with the Cody test suites today...

1 Comment