by definitionif it is only one element in the listit is sorted thenmerge sort combines the smaller sorted lists keeping the new list sorted too step if it is only one element in the list it is already sortedreturn step divide the list recursively into two halves until it can no more be divided step merge the smaller lists into new list in sorted order merge sort works with recursion and we shall see our implementation in the same way procedure mergesortvar as array if = return var as array [ [ / var as array [ / + [nl mergesortl mergesortl return mergel end procedure procedure mergevar as arrayvar as array var as array while and have elements if [ [ add [ to the end of remove [ from else add [ to the end of remove [ from end if end while while has elements add [ to the end of remove [ from end while while has elements add [ to the end of remove [ from end while return end procedure