numitems++double newkey newitem ddata/will add new item /key of new item for(int =order- >= --/start on right/examine items if(itemarray[ =null/if item nullcontinue/go left one cell else /not null/get its key double itskey itemarray[jddataif(newkey itskey/if it' bigger itemarray[ + itemarray[ ]/shift it right else itemarray[ + newitem/insert new item return + /return index to /new item /end else (not null/end for /shifted all itemsitemarray[ newitem/insert new item return /end insertitem(/public dataitem removeitem(/remove largest item /assumes node not empty dataitem temp itemarray[numitems- ]/save item itemarray[numitems- null/disconnect it numitems--/one less item return temp/return item /public void displaynode(/format "//for(int = <numitemsj++itemarray[jdisplayitem()/"/ system out println("/")/final "///end class node ///////////////////////////////////////////////////////////////class tree private node root new node() /make root node