created backup

compile using gcc

include file https://github.com/gotclout/Utils/blob/master/Timer.h


g++ -g heapsort.cpp -lrt -o heapsort


to execute
./heapsort 2 51


Test Heap Sort
   Cycles: 2
 Elements: 11

Testing...
Num swaps for insertion: 0
Num swaps for insertion: 1
Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 1
Num swaps for insertion: 0
Num swaps for insertion: 1
Num swaps for insertion: 1
Num swaps for insertion: 1
Time to insert 11 elements
Rendering Timer...
Start Time: 1413520080431210752ns
End Time: 1413520080431292416ns
Cur Time: 1413520080431304192ns
Offset: 0ns
Elapsed: 11776ns
Duration: 81664ns : 8.17261e-05s

Removing Root...
Sifting down
Root: 3
Removing Root...
Sifting down
Root: 10
Removing Root...
Sifting down
Root: 25
Removing Root...
Sifting down
Root: 28
Removing Root...
Sifting down
Root: 50
Removing Root...
Sifting down
Root: 76
Removing Root...
Sifting down
Root: 77
Removing Root...
Sifting down
Root: 84
Removing Root...
Sifting down
Root: 86
Removing Root...
Sifting down
Root: 86
Removing Root...
Sifting down
Root: 92
Total number of sift operations 11
Time to remove heap root with 11elements
Rendering Timer...
Start Time: 1413520080431490816ns
End Time: 1413520080431694592ns
Cur Time: 1413520080431713280ns
Offset: 0ns
Elapsed: 18688ns
Duration: 203776ns : 0.000203874s

Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 0
Num swaps for insertion: 1
Num swaps for insertion: 2
Num swaps for insertion: 0
Num swaps for insertion: 1
Num swaps for insertion: 0
Time to insert 11 elements
Rendering Timer...
Start Time: 1413520080431780352ns
End Time: 1413520080431859712ns
Cur Time: 1413520080431939072ns
Offset: 0ns
Elapsed: 79360ns
Duration: 79360ns : 7.93238e-05s

Removing Root...
Sifting down
Root: 14
Removing Root...
Sifting down
Root: 21
Removing Root...
Sifting down
Root: 26
Removing Root...
Sifting down
Root: 36
Removing Root...
Sifting down
Root: 39
Removing Root...
Sifting down
Root: 45
Removing Root...
Sifting down
Root: 72
Removing Root...
Sifting down
Root: 75
Removing Root...
Sifting down
Root: 82
Removing Root...
Sifting down
Root: 101
Removing Root...
Sifting down
Root: 104
Total number of sift operations 11
Time to remove heap root with 11elements
Rendering Timer...
Start Time: 1413520080432024064ns
End Time: 1413520080432279296ns
Cur Time: 1413520080432302592ns
Offset: 0ns
Elapsed: 23296ns
Duration: 255232ns : 0.000255228s