a) The two lists can be sorted first by .. let's say merge sort -> O(nlogn)
b) if the two sorted lists are L1, L2 then,
for element in L1: # will run for n times
{ Binary_search(L2, element) # O(logn), will return the matched element.
if matched:
insert_into(L3) # O(1)
}
Total Time = a) + b) = O(nlogn) + O(n*(logn + 1)) = O(nlogn)