Name: ________________________________

CSE373 Spring Quarter
University of Washington
Miniquiz #9
May 4, 2005
Closed book, closed notes, closed neighbor; no calculators
1 point per part except as noted

. (2 pts. per part)
 
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
30 4 5 10 7 20 21 11 105 13 22 33 29  80 9 3 ...

 

1. Assume the usual array representation of a heap.  If the current heap size is 11, draw the heap as a tree.

 

 

 

 

 

 

 

2. Go back to the array representation.  Modify the array to show the results of adding the value 18 to the heap.  [Show this directly on the array above].