/**
* Merges two arrays as needed by the Merge Sort algorithm.
*
* Preconditions:
*
arr has two parts that have already been sorted:
* (1) From the beginning to index middle
* (2) From index middle + 1 to the end of the array.
* arr is completely sorted
*