Merge sort implemented.