Recursive merge sort algorithm
Constructing max-heap for heapsort algorithm