Implementation of recursive merge sort from [CORMEN3].