Schaffer, Russel and Sedgewick, Robert. "The analysis of heapsort." Journal of Algorithms 15 , no. 1 (1993): 76-100.