leetcode(2) Reverse Integer
difficult:easy #728
Given a 32-bit signed integer, reverse digits of an integer.
Example 1:1
2Input: 123
Output: 321
Example 2:1
2Input: -123
Output: -321
Example 3:1
2Input: 120
Output: 21
Note:
Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−$2^{31}$ , $2^{31}$ − 1]. For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows.
解法
1 | |
版权声明:原创,转载请注明来源,否则律师函警告
leetcode(2) Reverse Integer
https://jiaopaner.github.io/2018/07/06/leetcode(2) Reverse Integer/