. (2 pts.) | |
Draw a "complete" binary tree with
exactly 10 nodes. Leave the nodes unlabeled.
|
|
Check: all levels full except the last one, all nodes at lowest level as far to the left as possible |
. (2 pts.) | |
Suppose a node in a tree has the value 5, its left
child has the value 3, and its right child has the value 7. Could
this be part of a tree which has the "heap property"?
Explain briefly.
|
|
No. If min-heap, both children would need to be greater than 5. If max-heap, both would need to be less. (Min is kind of the default -- your answer doesn't need to mention both the min and max cases). |
. (1 free bonus pt.) | |
Choose all that apply: |
|