Logo Data Structures and Algorithms with Object-Oriented Design Patterns in C++
next up previous contents index

Member Variables

The BinaryHeap class has a rather simple implementation. In particular, it requires only a single member variable, array, which is declared as an array of pointers to Object class instances. This array is used to hold pointers to the objects which are contained in the binary tree. When there are n items in the heap, the pointers to those items occupy the first n array positions.


next up previous contents index

Bruno Copyright © 1997 by Bruno R. Preiss, P.Eng. All rights reserved.