-
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
- 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