Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started