Please write clearly and use extra sheets of paper as needed. Scans or good quality pictures of handwritten solutions are absolutely fine.
1- We are using heapsort to sort the following array.
5 2 1 7 3 6 4 9 8
Give the state of the array after it is max heapified in phase 1 of heapsort.
Give the state of the array after 3 "removes" (we are not really deleting anything) have been performed from the heap in phase 2 of heapsort.
2- Draw the BST that results from inserting the following keys one by one in the given order.
50 30 70 5 15 55 60 20 80 1 75 40