Merge sort on a list to create a doubly linked list.  Pointers and all that jazz.