Can we merge two unsorted lists in constant time?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
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