In: Computer Science
In Java-
Draw each binary tree that is the maximum heap that results from inserting one by one in the order given the values 20, 15, 25, 30, 45, 18, 10, 12, 16. Note that your tree diagram should show the heap after the maximum heap property has been restored. Submit nine diagrams.
Next, draw each binary tree that is the maximum heap as each maximum value is deleted from the above tree and after the maximum heap property has been restored. Once again, there will be nine diagrams.
Place both clearly labeled sets of trees into the document mentioned above. You may draw these by hand, scan them, convert the scanned image to a JPEG image, and place that into a document. Do not submit a file that is an image. It must be embedded in a document with your name typed at the top.