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

Implementation

This section presents an implementation of leftist heaps that is based on the binary tree implementation described in Section gif. Program gif introduces the LeftistHeap class. The LeftistHeap class extends the BinaryTree class introduced in Program gif and it implements the MergeablePriorityQueue interface defined in Program gif.

   program25464
Program: LeftistHeap fields.




next up previous contents index

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