Sorting Algorithms.
structure called a “heap.” It builds a max-heap or min-heap from the elements to be sorted and then efficiently extracts and places the extremum element to achieve sorting. How Heap Sort Works Heapification: The unsorted array is treated as a binary tree and transformed into a max-heap or min-heap