left and right; the values in each list are in non-decreasing order. Either list may be empty (that is, None).
Join the nodes of both lists into one list that is also in non-decreasing order, and return its first node. You do not need to create new nodes; relinking the existing ones is enough.left=list_node([2, 6, 8]), right=list_node([1, 6, 10, 11]) → [1, 2, 6, 6, 8, 10, 11]
The nodes of both lists line up in ascending order; both 6s stay in the result.
left=list_node([]), right=list_node([-4, 0]) → [-4, 0]
The first list is empty, so the answer is the second list as it is.
left=list_node([]), right=list_node([]) → None
left=list_node([2, 6, 8]), right=list_node([1, 6, 10, 11])
[1, 2, 6, 6, 8, 10, 11]
Run checks the first 3 tests in your browser. Submit checks all 96 tests on the server, hidden ones included.