Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 680 Bytes

File metadata and controls

45 lines (37 loc) · 680 Bytes

Heapsort

  • Sorting a list of n elements using Heapsort

  • O(n log n)

  • Instance format:

    • n: number of elements
    • vj: value of j object
  • Input:

        n
        1 v1
        2 v2
        ...
        n vn
  • Output:
        Sorted items by value

Running

  • Compiling:
    source configure.sh
  • Running an instance:
    ./Heapsort "path_instance"
  • Example: running an instance "lst_500.in":
    ./Heapsort instances/lst_500.in
  • Example: running an instance "lst_1000.in":
    ./Heapsort instances/lst_1000.in