Course Solutions Uncategorized (Solved) : 1 Show Buildheap Maxheap Works Following 10 Keys 3 8 9 2 5 6 10 1 0 9 Assume Root Index 1 Q32769511 . . . .

(Solved) : 1 Show Buildheap Maxheap Works Following 10 Keys 3 8 9 2 5 6 10 1 0 9 Assume Root Index 1 Q32769511 . . . .

 

1) Show how BuildHeap (MaxHeap) works on thefollowing 10 keys: 3, 8, 9, -2, 5, 6, 10, 1, 0 and 9. Assume thatthe root is in index 1.

Draw the following binary trees

a. for the initial array:

b. after nodes indexed 5 and 4 the two nodes have beenfixed:

c. after nodes indexed 3 and 2 have been fixed:

d. the final heap:

2) Given the following adjacency listrepresentation of a graph, draw the graph, give the visited nodeorder for each type of graph search, starting with s, and give atopological sorting or state why one does not exist:

Adj[1]->4->6->7
Adj[2]->3->4->7
Adj[3]-> 2->5->6
Adj[4]->1->2->5->6
Adj[5]->3->4
Adj[6]->1->3->4->7
Adj[7]->1->2->6

a. Draw the graph:

b. Breadth First

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : Question Completion Status Question 23 29 Moving Another Question Save Response Question 2 Q28382298(Answered) : Question Completion Status Question 23 29 Moving Another Question Save Response Question 2 Q28382298

<br/><img src="https://media.cheggcdn.com/media%2F96d%2F96d4cae4-62b5-4d0f-b15d-b8179b2e6b30%2Fimage" alt="Question Completion Status: Question 23 of 29 Moving to another question will save this response Question 23 0.5 points Save Answer A food cart sells Indian food (Corys