Determine whether an integer is a palindrome. Do this without extra
space.
if use recursive, like check the first dig and last dig, then remove them,
check the rest, it will fail when digint like "1021", when remove the first and
last one, the remaining would simply be "2", not "02".
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
[LeetCode] [Palindrome Number 2012-01-04],布布扣,bubuko.com