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

Fields

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


next up previous contents index

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