{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Priority Queues and Heaps_Part_5

Priority Queues and Heaps_Part_5 - Prof J Elder 23...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Last Updated: 06/02/12 8:32 PM CSE 2011 Prof. J. Elder - 21 - We can construct a heap storing n keys using a bottom-up construction with log n phases In phase i , pairs of heaps with 2 i 1 keys are merged into heaps with 2 i + 1 1 keys Bottom-up Heap Construction 2 i 1 2 i 1 2 i + 1 1
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
Last Updated: 06/02/12 8:32 PM CSE 2011 Prof. J. Elder - 22 - Example 15 16 12 4 7 6 20 23 25 15 16 5 12 4 11 7 6 27 20 23
Image of page 2
Last Updated: 06/02/12 8:32 PM CSE 2011
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
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Prof. J. Elder - 23 - Example (contd.) 25 15 16 5 12 4 11 9 6 27 20 23 15 25 16 4 12 5 6 9 11 20 27 23 Last Updated: 06/02/12 8:32 PM CSE 2011 Prof. J. Elder - 24 - Example (contd.) 7 15 25 16 4 12 5 8 6 9 11 20 27 23 4 15 25 16 5 12 7 6 8 9 11 20 27 23 Last Updated: 06/02/12 8:32 PM CSE 2011 Prof. J. Elder - 25 - Example (end) 4 15 25 16 5 12 7 10 6 8 9 11 23 20 27 5 15 25 16 7 12 10 4 6 8 9 11 20 27 23...
View Full 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