lec09 - Double-Ended Priority Queues Primary operations...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Double-Ended Priority Queues Primary operations Insert Remove Max Remove Min Note that a single-ended priority queue supports just one of the above remove operations.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
General Methods Dual min and max single-ended priority queues. Correspondence based min and max single- ended priority queues.
Background image of page 2
Specialized Structures Symmetric min-max heaps. Min-max heaps. Deaps. Interval heaps .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Dual Single-Ended Priority Queues Each element is in both a min and a max single-ended priority queue. Single-ended priority queue also must support an arbitrary remove. Each node in a priority queue has a pointer to the node in the other priority queue that has the same element.
Background image of page 4
9-Element Example Only 5 of 9 two-way pointers shown. Insert, remove min, remove max, initialize. Operation cost is more than doubled relative to heap. Space for 2n nodes. 1 4 5 8 6 Min Heap 9 1 4 7 2 3 8 Max Heap
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Correspondence Structures
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2010 for the course COT 5536 taught by Professor Sartajsahani during the Spring '10 term at University of Florida.

Page1 / 16

lec09 - Double-Ended Priority Queues Primary operations...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online