S&P Global interview question

Create a heapsort search algorithm.