@@ -0,0 +1,1733 @@
+/**%0A * https://leetcode.com/problems/add-two-numbers/%0A */%0A%0A/**%0A * Definition for singly-linked list.%0A * public class ListNode %7B%0A * int val;%0A * ListNode next;%0A * ListNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public static class ListNode %7B%0A        int val;%0A        ListNode next;%0A%0A        public ListNode(int x) %7B%0A            this.val = x;%0A        %7D%0A    %7D%0A%0A    public ListNode addTwoNumbers(ListNode l1, ListNode l2) %7B%0A        ListNode p1 = l1;%0A        ListNode p2 = l2;%0A        ListNode rtn = new ListNode(0);%0A        ListNode p3 = rtn;%0A        int carry = 0;%0A        while ((p1 != null && p2 != null) %7C%7C carry != 0) %7B%0A            int sum = (p1 == null ? 0 : p1.val) + (p2 == null ? 0 : p2.val) + carry;%0A            p3.next = new ListNode(sum %25 10);%0A            carry = sum / 10;%0A            p3 = p3.next;%0A            if (p1 != null) %7B%0A                p1 = p1.next;%0A            %7D%0A            if (p2 != null) %7B%0A                p2 = p2.next;%0A            %7D%0A        %7D%0A        if (p1 != null) %7B%0A            p3.next = p1;%0A        %7D%0A        if (p2 != null) %7B%0A            p3.next = p2;%0A        %7D%0A        return rtn.next;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Solution solution = new Solution();%0A        ListNode l1 = new ListNode(2);%0A        l1.next = new ListNode(4);%0A        l1.next.next = new ListNode(3);%0A        ListNode l2 = new ListNode(5);%0A        l2.next = new ListNode(6);%0A        l2.next.next = new ListNode(7);%0A        l2.next.next.next = new ListNode(9);%0A        ListNode result = solution.addTwoNumbers(l1, l2);%0A%0A        ListNode p = result;%0A        while (p != null) %7B%0A            System.out.print(p.val + %22, %22);%0A            p = p.next;%0A        %7D%0A        System.out.println();%0A    %7D%0A%7D%0A

Add add-two-numbers