Heap Exercise-Complexity of Algorithms-Assignment, Exercises of Advanced Algorithms

This assignment was given by Manju Nripendra at West Bengal State University for Theory of Complexity and Algorithms course. It includes: Heap, Portion, Draw, Vector, Representation, Operations, Element, Insert

Typology: Exercises

2011/2012

Uploaded on 07/17/2012

padmaghira
padmaghira 🇮🇳

3.2

(5)

53 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
A Heap(ing) Portion
1. Insert the items into a heap (that is initially empty) in the order given
below:
12,6,20,11,7,9,15,10,3
Draw the heap after each insertion. Give a vector representation of the
heap after the last item has been inserted.
2. Consider the heap given below.
First perform two DeleteMin operations on this heap. Then insert the
element 14 into the heap. Finally perform one more DeleteMin opera-
tion. As above, draw the heap after each step and give the final vector
representation after all the operations have been performed.
1
docsity.com

Partial preview of the text

Download Heap Exercise-Complexity of Algorithms-Assignment and more Exercises Advanced Algorithms in PDF only on Docsity!

A Heap(ing) Portion

  1. Insert the items into a heap (that is initially empty) in the order given below: 12 , 6 , 20 , 11 , 7 , 9 , 15 , 10 , 3 Draw the heap after each insertion. Give a vector representation of the heap after the last item has been inserted.
  2. Consider the heap given below.

First perform two DeleteMin operations on this heap. Then insert the element 14 into the heap. Finally perform one more DeleteMin opera- tion. As above, draw the heap after each step and give the final vector representation after all the operations have been performed.

docsity.com