public ListNode mergeTwoLists(ListNode l1, ListNode l2) {
		if (l1 == null) {
			return l2;
		}
		if (l2 == null) {
			return l1;
		}

		ListNode head = null;
		ListNode cur = null;
		while (l1 != null || l2 != null) {
			if (l1 == null) {
				ListNode nc = new ListNode(l2.val);
				cur.next = nc;
				cur = nc;
				l2 = l2.next;
			} else if (l2 == null) {
				ListNode nc = new ListNode(l1.val);
				cur.next = nc;
				cur = nc;
				l1 = l1.next;
			} else {
				if (l1.val <= l2.val) {
					if (cur == null) {
						cur = new ListNode(l1.val);
						head = cur;
					} else {
						ListNode nc = new ListNode(l1.val);
						cur.next = nc;
						cur = nc;
					}
					l1 = l1.next;
				} else {
					if (cur == null) {
						cur = new ListNode(l2.val);
						head = cur;
					} else {
						ListNode nc = new ListNode(l2.val);
						cur.next = nc;
						cur = nc;
					}
					l2 = l2.next;
				}

			}
		}
		return head;
	}