(amin-heap (bmax-heap figure examples of heap definition the heap is specialized structure with limited operations we can insert new value into heap or extract and remove the root node' value from the heap in this sectionwe explore these operations for use with max-heap their application to min-heap is identical except for the logical relationship between each node and its children insertions when new value is inserted into heapthe heap order property and the heap shape property ( complete binary treemust be maintained suppose we want to add value to the max-heap in figure (bif we are to maintain the property of the max-heapthere are only two places in the tree where can be insertedas shown in figure (acontrast this to the possible locations if we were to add value to the max-heapshown in figure (bknowing the possible locations is only part of the problem what happens to the values in the nodes where the new value must be stored in order to maintain the heap order propertyin other wordsif we insert into the heapit must be placed into either the node currently containing or suppose we choose to place it in the node containing value what becomes of value it will have to the nodes where value can be inserted the nodes where value can be inserted ( (bfigure candidate locations in heap for new values