Which statement correctly explains Heap sort?
- A. An algorithm that computes shortest paths from a single source vertex in a graph, even with negative edge weights.
- B. A greedy algorithm that finds a minimum spanning tree for a connected, weighted graph by adding edges in increasing order of weight.
- C. A sorting algorithm that repeatedly selects the smallest remaining element and moves it to its correct position.
- D. A comparison-based sorting algorithm that uses a binary heap data structure to sort elements. ✓
Correct answer
D. A comparison-based sorting algorithm that uses a binary heap data structure to sort elements.
Explanation
Heap sort refers to a comparison-based sorting algorithm that uses a binary heap data structure to sort elements.