I am studying algorithms and how efficient they can be. So I have a question concerning merging of linked lists.
If I have two linked lists. One is double the size of the other. And and larger one is sorted, where as the smaller one is unsorted. Is there a way to take the elements from the small unsorted linked list and add it to the larger sorted list, so that the new list remains sorted, without reaching O(n^2) ??
If so, how would you carryout this operation?