Can we merge two unsorted lists in constant time?

31 replies · 6K views · last reply
I like Serena said:
That's it. (Mmm)

Great! Thank you! (Party)
 
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