logoSEE ALGORITHMS
Sorting
    Bubble Sort
    Insertion Sort
    Selection Sort
    Radix Sort
    Heap Sort
    Merge Sort
    Quick Sort
    Depth First Search
    Breadth First Search
    Prim's Algorithm
    Kruskal's Algorithm
    Dijkstra's Algorithm
    Topological Sorting
    Hamiltonian Cycle
    Binary Search Tree
    Binary Heap
    Circular Queue
    Convex Hull
    Huffman Coding
Heap Sort

Heap Sort is an efficient sorting algorithm that leverages a Binary Heap data structure to organize and sort data. It works by first building a heap from the data and then repeatedly extracting the largest (or smallest) element from the heap and rebuilding the heap until all elements are sorted. This method is known for its reliable performance and in-place sorting capabilities, making it a strong choice for handling large datasets without requiring extra memory.

    for i = (n / 2 - 1) down to 0:
        heapify(i)
    for i = n - 1 down to 1:
        swap(0, i)
        heapify(0)
Select number of elements: