A min-max heap is a data structure that supports both deleteMin and deleteMax at logarithmic cost. The structure is identical to the binary heap. The min-max heap-order property is that for any node X at even depth, the key stored at X is the smallest in its subtree, whereas for any node X at odd depth, the key stored at X is the largest in its subtree. The root is at even depth. Do the following.
a. Draw a possible min-max heap for the items l,2, 3, 4, 5,6, 7, 8, 9, and 10. Note that there are many possible heaps.
b. Determine how to find the minimum and maximum elements.
c. Give an algorithm to insert a new node into the min-max heap.
d. Give an algorithm to perform dele t eMin and dele t eMax.
e. Give an algorithm to perform buildHeap in linear time.