@@ -0,0 +1,818 @@
+package leetCode;%0A%0Aimport java.util.List;%0A%0A/**%0A * Created by Dave on 2016/10/15.%0A */%0Apublic class AddTwoNumbers%0A%7B%0A    private ListNode solutionOne(ListNode l1, ListNode l2)%0A    %7B%0A        ListNode prev = new ListNode(0);%0A        ListNode head = prev;%0A        int carry = 0;%0A%0A        while(l1 != null %7C%7C l2 != null %7C%7C carry != 0)%0A        %7B%0A            ListNode cur = new ListNode(0);%0A            int sum = ((l2 == null) ? 0 : l2.val) + ((l1 == null) ? 0 : l1.val) + carry;%0A            cur.val = sum %25 10;%0A            carry = sum / 10;%0A            prev.next = cur;%0A            prev = cur;%0A%0A            l1 = (l1 == null) ? l1 : l1.next;%0A            l2 = (l2 == null) ? l2 : l2.next;%0A        %7D%0A        return head.next;%0A    %7D%0A%7D%0A%0Aclass ListNode%7B%0A    int val;%0A    ListNode next;%0A    ListNode(int x)%7B%0A        val = x;%0A    %7D%0A%7D%0A

add two numbers