Determine whether an integer is a palindrome. Do this without extra space.
本题是判断一个数是否是回文数。
代码如下:
bool isPalindrome(int x) {
int max = x;
int min = 0;
while(max >0){
min *= 10;
min+= max %10;
max /=10;
}
return min==x;
}原文:http://blog.csdn.net/sunao2002002/article/details/46318421