comply heap sort