I was reading JeffE's (Prof. Jeffrey Erickson) notes on solving recurrences, and he used Merge[A[1,...n], m] where A is an array(I think) and m is an integer. What does this mean? I thought Merge sort took two arrays as input. He includes psuedo code, but I can't decipher what is means. What is it doing?

Thank you for any help.

Link: http://jeffe.cs.illinois.edu/teaching/algorithms/notes/99-recurrences.pdf


1 Answer 1


$Merge[A[1,...n], m]$ means merge arrays $A[1..m]$ and $A[m+1..n]$.

They are recursively sorted before merging by

MergeSort(A[1 .. m])
MergeSort(A[m + 1 .. n]) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.