private node[heaparrayprivate int maxsizeprivate int currentsize/size of array /number of nodes in array /public heap(int mx/constructor maxsize mxcurrentsize heaparray new node[maxsize]/create array /public boolean isempty(return currentsize== /public boolean insert(int keyif(currentsize==maxsizereturn falsenode newnode new node(key)heaparray[currentsizenewnodetrickleup(currentsize++)return true/end insert(/public void trickleup(int indexint parent (index- node bottom heaparray[index]whileindex &heaparray[parentidata bottom idata heaparray[indexheaparray[parent]/move it down index parentparent (parent- /end while heaparray[indexbottom/end trickleup(/public node remove(/delete item with max key /(assumes non-empty listnode root heaparray[ ]