Sort an array by dividing it into two halves, sorting them, and then merging the sorted halves.
How it works: Divides the array into halves, sorts them, and merges them back together.