The activities in this lab mimic problems that you are likely to see on the final exam and can be answered using pen(cil) and paper.
2 / \ / \ / \ / \ / \ / \ / \ 5 7 / \ / \ / \ / \ / \ / \ / \ / \ 6 15 12 9 / \ / \ / \ / \ 8 14 23 18 |
1. Show the contents of an array that represents the heap.
2. Carry out the following operations in succession, showing what the heap looks like after each operation has been completed.
(a) insert(16)
(b) insert(-1)
(c) deleteMin()
(d) deleteMin()
Apply Kruskal's Algorithm to the graph shown below to produce a minimum spanning tree. In addition to showing the edges that were chosen to be in the tree, identify the edges that were candidates to be included but were rejected because they would have given rise to a cycle.