Meta Interview Question

Heap sorting algorithm for k sorted array