implement the heap-sort as the sort algorithm of ordered queue