maxsize mxcurrentsize heaparray new node[maxsize]/public node remove(/delete item with max key /(assumes non-empty listnode root heaparray[ ]heaparray[ heaparray[--currentsize]trickledown( )return root/end remove(/public void trickledown(int indexint largerchildnode top heaparray[index]/save root while(index currentsize/ /not on bottom row int leftchild *index+ int rightchild leftchild+ /find larger child if(rightchild currentsize &/right ch existsheaparray[leftchildidata heaparray[rightchildidatalargerchild rightchildelse largerchild leftchild/top >largerchildif(top idata >heaparray[largerchildidatabreak/shift child up heaparray[indexheaparray[largerchild]index largerchild/go down /end while heaparray[indextop/root to index /end trickledown(/public void displayheap(int nblanks int itemsperrow int column int /current item string dots "system out println(dots+dots)/dotted top line