Heap Sort: Presented By, M.Sangeetha, Ap/Cse, Kongu Engineering College
Heap sort is a sorting algorithm that uses a heap data structure. It works by first transforming the input array into a max-heap by using the heapify operation, where the largest element is stored at the root. It then extracts this largest element from the heap, exchanges it with the last element of the heapified array, and shrinks the size of the heap. This process is repeated until the heap contains only one element.
We take content rights seriously. If you suspect this is your content, claim it here.
0 ratings0% found this document useful (0 votes)
60 views6 pages
Heap Sort: Presented By, M.Sangeetha, Ap/Cse, Kongu Engineering College
Heap sort is a sorting algorithm that uses a heap data structure. It works by first transforming the input array into a max-heap by using the heapify operation, where the largest element is stored at the root. It then extracts this largest element from the heap, exchanges it with the last element of the heapified array, and shrinks the size of the heap. This process is repeated until the heap contains only one element.