{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

6 - Feunily Name_————~————‘—— 5(10...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Feunily Name: ___————~————‘—— 5. (10 marks) (a) The following may contains a heap with integer keys. Nothing i 0, so we mark it with an X. s stored at index _ £3) The following array contains a heap with integer keys. Nothing is stored at index .6 . 0,sowema.rkitwithanx. as it would look after inserHS] followed by insert{2). 2/} Give the final version of the may (c) Consider a. heap having unique keys ' trial, stored in All] .. ADMIN]. Circle True or False for each of the following I ‘ 0 6/é statements.Con-ectanswer=l.lnoorrectormiasmgnnswer= . Do not add comments or explanations. _ (i) There are 5000 leave. True False (ii) Aim] > M3999} Tine False (iii) M4000] > 14125] True False (iv) In a preorder traversal of the heap (as a binary tree), the last node visited contains the largest value. 'Ihle False (v) In a poetorder traversal of the heap (as a binaryr tree), _ the last node visited contains the smallmt value. True False (vi) It is possible to determine whether key value 99999 is True False stored in the heap using no more than 14 comparisons. Page 8 of 10 ...
View Full Document

{[ snackBarMessage ]}