Reverse a Number
Description
Given an integer N, reverse the digits of N. If N ends in 0, the reversed number should not have leading zeros (unless N=0). Also, handle negative numbers correctly.
Given an integer N, reverse the digits of N. If N ends in 0, the reversed number should not have leading zeros (unless N=0). Also, handle negative numbers correctly.