CSE 326: Data Structures Lecture #6 Putting Our Heaps Together

1/28/00


Click here to start


Table of Contents

CSE 326: Data Structures Lecture #6 Putting Our Heaps Together

Today’s Outline

New Operation: Merge

Idea: Hang a New Tree

Idea: Hang a New Tree

Leftist Heaps

Random Definition: Null Path Length

Leftist Heap Properties

Leftist tree examples

Right Path in a Leftist Tree is Short

Whew!

Merging Two Leftist Heaps

Merge Continued

Operations on Leftist Heaps

Example

Sewing Up the Example

Finally…

Iterative Leftist Merging

Iterative Leftist Merging

Random Definition: Amortized Time

Skew Heaps

Merging Two Skew Heaps

Example

Skew Heap Code

Comparing Heaps

To Do

Coming Up

Author: Steve Wolfman

Email: owner-cse326@cs.washington.edu

Home Page: http://www.cs.washington.edu/326/

Download presentation source