Question: create a floating point array of 10 elements. Sort them in ascending order. using this algorithm c programming function mergesort(al1... n]) Input: An array of
create a floating point array of 10 elements. Sort them in ascending order. using this algorithm
c programming

function mergesort(al1... n]) Input: An array of numbers al1...n] Output: A sorted version of this array ifn>1: return merge(mergesort(a[1... (n/2)]), mergesort(a[ (n/2)+1.. . n]) else function merge(x[1.. .kl,yl1.. .1] if k 0: return y[1..I] if 1- 0: return x[1..k] if x[1] s y[1: return x[1] merge(x[2... k], y[1... 1]) else: return yl1] merge(x[1...k].yl2.. .I])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
