Question: An important step in the mergesort algorithm involves the merging of sorted lists. The result of merging two sorted lists is a sorted lists whose

 An important step in the mergesort algorithm involves the merging of

An important step in the mergesort algorithm involves the merging of sorted lists. The result of merging two sorted lists is a sorted lists whose elements belong to the original two sorted lists. 1 merge [1,3,5] [2.4,611.2,3.4,5.6] 2 merge [1,2,5] [3,4,61[1,2,3,4,5,61 3 merge [i] 2,4,61 01,2,4,6] Write an SML function, called merge ists, that takes as input a list of sorted lists LL and returns a sorted list as its result. The result list is obtained by repeatedly merging lists in LL result [1,2,3,4,5,6 1 mergeLists [1,3,5], 02,4,61 : 2mergeLists I [1,5], 02,4,6. [3,10, result [1.2,3,4,5,6,10]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!