heap heap can be thought of as simple tree data structurehowever heap usually employs one of two strategies min heapor max heap each strategy determines the properties of the tree and its values if you were to choose the min heap strategy then each parent node would have value that is <than its children for examplethe node at the root of the tree will have the smallest value in the tree the opposite is true for the max heap strategy in this book you should assume that heap employs the min heap strategy unless otherwise stated unlike other tree data structures like the one defined in ss heap is generally implemented as an array rather than series of nodes which each have references to other nodes the nodes are conceptually the samehoweverhaving at most two children figure shows how the tree (not heap data structure( ( ( )would be represented as an array the array in figure is result of simply adding values in top-to-bottomleft-to-right fashion figure shows arrows to the direct left and right child of each value in the array this is very much centred around the notion of representing tree as an array and because this property is key to understanding this figure shows step by step process to represent tree data structure as an array in figure you can assume that the default capacity of our array is eight using just an array is often not sufficient as we have to be up front about the size of the array to use for the heap often the run time behaviour of program can be unpredictable when it comes to the size of its internal data structuresso we need to choose more dynamic data structure that contains the following properties we can specify an initial size of the array for scenarios where we know the upper storage limit requiredand the data structure encapsulates resizing algorithms to grow the array as required at run time