@@ -0,0 +1,623 @@
+package leetcode;%0A%0A/**%0A * https://oj.leetcode.com/problems/reverse-integer/%0A */%0Apublic class Problem7 %7B%0A    public int reverse(int x) %7B%0A        int n = 0;%0A        int tmp = x;%0A        while (tmp != 0) %7B%0A            n++;%0A            tmp /= 10;%0A        %7D%0A        // use long to check for an overflow%0A        long newValue = 0;%0A        for (int i = n; i %3E 0; i--) %7B%0A            int y = x %25 10;%0A            newValue += y * (long) Math.pow(10, i-1);%0A            x /= 10;%0A        %7D%0A        if (newValue %3E Integer.MAX_VALUE %7C%7C newValue %3C Integer.MIN_VALUE) %7B%0A            return 0;%0A        %7D%0A        return (int) newValue;%0A    %7D%0A%7D%0A

Solve problem 7