Only works when mergeSort returns int[] instead of modifying array as void, no idea why.