This is a function for merging two sorted linked list.