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

Info icon This 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.
Image of page 1

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

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

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

View Full Document Right 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.
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 7 9 3 8 6 2 Min Heap 9 6 5 1 4 7 2 3 8 Max Heap
Image of page 5

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern