You are given a single linked list which is split in to two sorted parts. Your goal is to write a function to merge the two parts in to one sorted list. Here is an example:
//Input 1->2->3->16->2->3->17 //Output 1->2->2->3->3->16->17
You are given a single linked list which is split in to two sorted parts. Your goal is to write a function to merge the two parts in to one sorted list. Here is an example:
//Input 1->2->3->16->2->3->17 //Output 1->2->2->3->3->16->17
Permalink: http://problemotd.com/problem/sorted-linked-list/
Content curated by @MaxBurstein
Comments:
Adam - 10 years, 8 months ago
Haskell!
reply permalink
Will - 10 years, 8 months ago
LISP -- a little cheaty, but hey. :)
reply permalink