ch6 partial added

some functions related to heapsort algorithm