Math
9. Palindrome Number
The tempting move — reverse the whole number and compare — risks overflowing int on the way. The fix is to reverse only the second half and compare it to the first. The moment the reversed tail is at…
Loading…
The tempting move — reverse the whole number and compare — risks overflowing int on the way. The fix is to reverse only the second half and compare it to the first. The moment the reversed tail is at…
Loading…