Bottom-up merge sort.