Can we merge two unsorted lists in constant time?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
31 replies · 5K views
I like Serena said:
That's it. (Mmm)

Great! Thank you! (Party)
 
Physics news on Phys.org
Code:
L1_tail.next=L2.head;
L1_tail=L2_tail;

If we would have an array $A$ and we would use a sentinel node, would it be like that? (Thinking)

Code:
A[i].sentinel=A[j].list;
A[i].sentinel=A[j].sentinel