kael
05-12-2004, 07:40 PM
I am trying to write a program that does heap sort, and I have to come up with an algorithm and such. I wanted to implement it by first inserting the items into a two dimensional array, with each row acting as a row of the heap. If you know what a heap is then you know it represents a tree and I am trying to figure out when to tell the program when to move to the next row. I think I figured it out by saying take the log base2 and checking that of each row. Thanks!