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
PayPal Gateway not configured
PayPal Gateway not configured