1. 1. Wap to implement Heap sort algorithm. #include #include void restoreHup(int*,int); void restoreHdown(int*,int,int); void main() { int…