How is heap sort implemented?



How is heap sort implemented?..

Answer / Kumar Alok Ranjan

Heap Sort implements a binary heap data structure, either max-heap or min-heap. The array of elements is first built as a binary heap, then the root element (the maximum/minimum value) is swapped with the last element, and the binary heap is rebuilt on the remaining elements. This process is repeated until the binary heap is empty.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Is array a linked list?

1 Answers  


Which is faster arraylist or hashmap?

1 Answers  


What is inserting in data structure?

1 Answers  


State the different ways of representing expressions?

1 Answers  


Write an algorithm through which the inserting and deleting of elements can take place in circular queue?

1 Answers  


Write the c program to insert a node in circular singly list at the beginning.

1 Answers  


What are the different types of hash functions?

1 Answers  


How to reverse singly link list?

1 Answers  


How do you get placements?

1 Answers  


Differentiate between collection and collections.

1 Answers  


What is the difference between b tree and binary search tree?

1 Answers  


Define a relation?

1 Answers  


Categories