LeetCode - Refresh - Reverse Integer

Remember to check overflows.html 1 class Solution { 2 public: 3 int reverse(int x) { 4 int sign = x < 0 ? -1 : 1, result = 0; 5 x = fabs(x); 6 while (x > 0) { 7
相關文章
相關標籤/搜索