Top-down mergesort with sorted check has mergecost (H+3)n

Simple proof that standard mergesort with a single extra comparison is run-adaptive in a rather strong sense. We consider standard top-down recursive mergesort, where we do a single comparison before calling merge, to check whether the two recursively sorted subproblems happen to already be correctly ordered. (If so, we can skip the merging step.) We show that for any input $A[0..n)$ consisting of…