For an instance, forget that arrays and strings exists. Your challenge, is to say if a number is a palindrome or not using mostly mathematical approach.
The string you will receive (because it is an user input), it always positive. You can assume that every 0 <= n < 10
is a palindrome.