@@ -0,0 +1,1045 @@
+import java.util.LinkedList;%0A%0Apublic class ListNode %7B%0A    int val;%0A    ListNode next;%0A    ListNode(int x) %7B val = x; %7D%0A%7D%0A%0Aclass Solution %7B%0A    public ListNode addTwoNumbers(ListNode l1, ListNode l2) %7B%0A        LinkedList%3CInteger%3E stack1 = new LinkedList%3C%3E();%0A        LinkedList%3CInteger%3E stack2 = new LinkedList%3C%3E();%0A%0A        while (l1 != null) %7B%0A            stack1.push(l1.val);%0A            l1 = l1.next;%0A        %7D%0A        while (l2 != null) %7B%0A            stack2.push(l2.val);%0A            l2 = l2.next;%0A        %7D%0A%0A        int carry = 0;%0A        ListNode res = new ListNode(0);%0A        while (stack1.size() %3E 0 %7C%7C stack2.size() %3E 0) %7B%0A            if (stack1.size() %3E 0) %7B%0A                carry += stack1.pop();%0A            %7D%0A            if (stack2.size() %3E 0) %7B%0A                carry += stack2.pop();%0A            %7D%0A%0A            res.val = carry %25 10;%0A            ListNode head = new ListNode(carry / 10);%0A            head.next = res;%0A            res = head;%0A            carry /= 10;%0A        %7D%0A%0A        return res.val == 0 ? res.next : res;%0A    %7D%0A%7D%0A

445. Add Two Numbers II