Question: Draw the tree you would get by viewing array a as a max heap. 0 1 2 3 4 5 6 a: 50 25 30
Draw the tree you would get by viewing array a as a max heap.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
| a: | 50 | 25 | 30 | 15 | 20 | 10 | 5 |
Does the array represent a proper heap?
What would be the return value of delMax() for this heap?
Show the tree representation and corresponding array after delMax() has been called. NOTE: not all array entries will still be used! (Draw the tree to the right of the array.)
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
| a: |
Show the tree representation and corresponding array after delMax() has been called a second time. NOTE: not all array entries will still be used! (Draw the tree to the right of the array.)
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
| a: |
Show the tree representation and corresponding array after a call to insert(27). NOTE: not all array entries will still be used! (Draw the tree to the right of the array.)
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
| a: |
Why doesnt this array represent a heap? (Draw the tree and it should be obvious.)
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
| a: | 90 | 80 | 70 | 60 | 75 | 71 | 55 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
