Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
University of Wuppertal Faculty C ---Department of Mathematics
 

Summary: University of Wuppertal
Faculty C --- Department of Mathematics
Dr. Holger Arndt, Dipl.≠Math. Sigrid Fischer
Algorithms and Data Structures
WS 2004/2005
Exercise Sheet 5
Exercise 15 (6 p.) Sketch the heap (represented as a tree) after each of the following
operations:
. insert the entries with the keys 43, 28, 19, 50, 34 and 20 in the initially empty
heap
. delete the entry with the maximum key
. delete the entry with the maximum key
Exercise 16 (6 p.) The following algorithm transforms the first n entries of the array
a into a heap.
for i = # n
2 # - 1, . . . , 0 do
k = i
correct_pos_found = false
while a[k] has any child and correct_pos_found = false do
determine child with maximal key

  

Source: Arndt, Holger - Fachgruppe Mathematik, Fachbereich Mathematik-Naturwissenschaften, Bergische Universitšt Wuppertal

 

Collections: Computer Technologies and Information Sciences