This preview shows page 1. Sign up to view the full content.
Unformatted text preview: collisions.) Carefully explain your reasoning, and give your nal answer in the simplest possible mathematical form. 3. (15 pts) Suppose H is a binary minheap with n nodes. Show the following facts for H (a) H has exactly d n/ 2 e leaves. (b) The maximum key is at one of the leaves. (c) Any algorithm that correctly performs ndMax must inspect every leaf node in H . 4. (10 pts) Suppose we use the array representation to store a dheap. For an entry located in position i , where are its parent and children located? Give both the formulae and their justication....
View
Full
Document
This note was uploaded on 12/27/2011 for the course CMPSC 130a taught by Professor Suri during the Fall '11 term at UCSB.
 Fall '11
 SURI

Click to edit the document details