heaps table heap levels versus heap size level of nodes at level ( - ( - ( - ( - for heap with items in itthe value of can be computed by adding up all the nodes at each level in the heap' tree to simplify our argument we'll assume that the heap is full binary tree - for some this is the sum of geometric sequence the sum of geometric sequence can be computed as follows + if  - applying this formula to our equation above the number of nodes in complete binary tree ( full binary heapwith levels is given by this formula below rm - - this implies that we can solve this equation for doing so we get log ( the brackets above are the ceiling operator and it simply means that we should round up to the next highest integer rounding up takes into account that not every heap tree is completely full so there may be some values of that won' give us an integer for if we didn' round up the following inequality will be useful in determining the computational complexity of phase of the heapsort algorithm log so far we have been able to determine that the height of complete binary tree ( the number of levelsis equivalent to the ceiling of the logbase of the number of elements in the tree + phase of our algorithm appends each value to the end of the list where it is sifted up to its final location within the heap since sifting up will go through at most levels and since the heap grows by one each timethe following summation describes an upper limit of value that is proportional to the amount of work that must be done in phase log ( = this copy belongs to 'acha