add the heap sort algorithm