@@ -0,0 +1,1082 @@
+public class Solution %7B%0A    public int myAtoi(String str) %7B%0A        String trimmed = str.trim();%0A        boolean sign = true;%0A        long sum = 0;%0A        for (int i=0; i%3Ctrimmed.length(); i++) %7B%0A            char current = trimmed.charAt(i);%0A            if (i==0) %7B%0A                if (current == '+') %7B%0A                    sign = true;%0A                %7D else if (current == '-') %7B%0A                    sign = false;%0A                %7D else if (Character.isDigit(current))%7B%0A                    sum += sign ? (trimmed.charAt(i)-'0') : -(trimmed.charAt(i)-'0');%0A                %7D else %7B%0A                    return 0;%0A                %7D%0A            %7D else if (Character.isDigit(current)) %7B%0A                sum *= 10;%0A                sum += sign ? (trimmed.charAt(i)-'0') : -(trimmed.charAt(i)-'0');%0A                if (sum %3E 2147483647L) %7B%0A                    return 2147483647;%0A                %7D else if (sum %3C -2147483648L) %7B%0A                    return -2147483648;%0A                %7D%0A            %7D else %7B%0A                break;%0A            %7D%0A        %7D%0A        return (int)sum;%0A    %7D%0A%7D%0A

8. String to Integer (atoi)