public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
		int carry = 0;
		int value = 0;
		ListNode head;
		ListNode temp;
		ListNode node;
		if (l1 == null || l2 == null) {
			return null;
		}
		value = l1.val + l2.val;
		head = new ListNode(value % 10);
		node = head;
		carry = value / 10;
		l1 = l1.next;
		l2 = l2.next;

		while (l1 != null || l2 != null) {
			value = 0;
			if (l1 != null) {
				value += l1.val;
				l1 = l1.next;
			}
			if (l2 != null) {
				value += l2.val;
				l2 = l2.next;
			}
			value += carry;
			carry = value / 10;
			temp = new ListNode(value % 10);
			node.next = temp;
			node = node.next;
		}
		if(carry != 0){
			temp = new ListNode(carry);
			node.next = temp;
		}
		
		return head;
	}