notes implementing -heaps as arrays the nodes of -heap can be stored in an array in breadth-first order (aallows indices for parents and children to calculated directlyeliminating the need for pointers key if is the index of an item xthen [( - )/dis the index of (xand the indices of the children of are in the range [ ( - di when the key of an item is decreasedwe can restore heap-orderby repeatedly swapping the item with its parent similarlyfor increasing an item' key -heap operations item function findmin(heap )return if {[nullh {( ) ( fiendprocedure siftup(item iinteger xmodifies heap )integer pp :( - )/ddo and key( ( )key( = ( : ( ) :pp :( - )/ odh( :iendprocedure insert(item imodifies heap )siftup( ,| , )endinteger function minchild(integer xheap )integer imincminc : ( - if minc | =>return fii :minc do if key( ( )minc :ifii : lovely professional university