Computer Science, asked by jjsingh, 1 year ago

how do u implement heapsort??

Answers

Answered by sakshisathe1
0
This is a C++ program to sort the given data using Heap Sort. 1. Heap sort is a comparison based algorithm. ... Build a max heap using the given data element.
Answered by Unimagic3408
0

Answer:

here is ur answer mate!!!!! pls mark brainlist

Explanation:

Heap sort is a sorting algorithm that takes the input data and sorts it in ascending or descending order. A Heap is a tree-like structure which is built using the input data.

The algorithm requires 3 steps to complete the sorting procedure:

Create a heap with the input data.

Sort the elements of the heap are sorted in ascending order.

Swap the root node with the last node and delete the last node from the heap.

Similar questions