Merge sort implementation - O(nlong)