Q:

Merge two linked lists Order

I have two sorted linked lists and need to merge them.
l1 = [a] -> [b] -> [c]
l2 = [b] -> [f]
l1plus2 = [a] -> [b] -> [c] -> [f]
What order would this be?

A:

Presumably, ascending order. :) Kidding.
If you mean "order of magnitude", the following solution will be O(m+n) or O(max(m,n)) where m is l1.length and n is l2.length.
Algorithm: Keep a pointer to each linked list, step through both, and add the lesser of the two elements. If the elements are the same, add it once and step both pointers.

