Heap sort program in Python

Posted by Editorial Staff | Updated on

Python Program for Heap Sort. Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the maximum element and place the maximum element at the end.

Heap sort program in Python

Copy the below python program and execute it to see the output.

Program Output

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers