C++ implementation of the merge sort algorithm.