Question: Consider the following graph: Draw the minimum spanning tree obtained by running Kruskal algorithm and explain the choice of edges every time. Consider the array
Consider the following graph: Draw the minimum spanning tree obtained by running Kruskal algorithm and explain the choice of edges every time. Consider the array containing the following elements: int a[8] = {5, 3, 1, 9, 8, 2, 4, 7}; Show the step-by-step execution of Heapsort algorithm taking as input the array a. In particular, first show how to create the heap then how to sort the elements (slides 42-46). At every iteration, show the heap and the corresponding array. Demonstrate the insertion of the keys 5, 28, 19, 15, 20, 33, 12, l7 into a hash table with collisions resolved by linear probing. Assume that the table has 9 slots and that the hash function is h(k) = k mod 9. Draw the state of the hash table after every insertion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
