|
Data Structures and Algorithms
with Object-Oriented Design Patterns in Python |
This section presents an implementation of leftist heaps
that is based on the binary tree implementation
described in Section
.
Program
introduces the LeftistHeap class.
The LeftistHeap class extends the
BinaryTree class introduced in Program
and the abstract MergeablePriorityQueue class
defined in Program
.

Program: LeftistHeap class __init__ method.