Question: 14. Heap representation. a) Draw the binary heap that results from inserting: 11, 9, 12, 14, 3, 15, 7, 8, 1 in that order into
14. Heap representation.
a) Draw the binary heap that results from inserting: 11, 9, 12, 14, 3, 15, 7, 8, 1 in that order into an initially empty heap.
b) A three-heap with n elements can be stored in an array A, where A[0] contains the root of the tree. Draw the three-heap that results from inserting 5, 2, 8, 3, 6, 4, 9, 7, 1 in that order into an initially empty three-heap. You do not need to show the array representation of the heap. You are only required to show the final tree, although if you draw intermediate trees, please circle your final result for ANY credit.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
