PDA

View Full Version : Counting Heap Sort Iterations


C++
08-23-2009, 06:52 PM
Hi, I need to write a program that counts how many total iterations are processed in a heap sort. I wrote the program but I don't think it is working properly. I have an array 32 numbers. The sort should go through a total of 160 iterations, right? Since it is of order nlogn. 32*5 = 160. However...