Question: What would be an appropriate name for the pseudocode function fn defined below? function fn ( var z ) var m: = length of z

What would be an appropriate name for the pseudocode function fn defined below?
function fn(var z)
var m:= length of z
im=1 return z
var a := new empty list var b := new empty list
vari :=0
while (i < m)
if (i < m /2)
append z[i] to a else
append z[i] to b end if
j:= i+1
end while
return fn2(fn(a), fn(b))
end function
function fn2(var a, var b) var r:= new empty list var ax :=0
var bx :=0
ALL
while (ax != length of a) and (bx != length of b)
if (a[ax]<= b[bx])
append a[ax] to r ax := ax +1
else
append b [bx] to r
bx : = bx +1
end if end while
return concatenation of r with (remainder of a) with (remainder of b)
end function
Programming for Ev...
PY4E - Python for E...
Answered: 2/13
01 hour 20 mins
3
4
5
Pick ONE option
merge_sort
pivot_sort
insertion_sort
3
4
bogo sort
5
heap_sort

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 Programming Questions!