in an ordered array you can find an item equally quicklybut inserting an item requireson the averagemoving , items inserting an item in tree with , , items requires or fewer comparisonsplus small amount of time to connect the item similarlydeleting an item from , , -item array requires moving an average of , itemswhile deleting an item from , , -node tree requires or fewer comparisons to find the itemplus (possiblya few more comparisons to find its successorplus short time to disconnect the item and connect its successor thusa tree provides high efficiency for all the common data storage operations traversing is not as fast as the other operations howevertraversals are probably not very commonly carried out in typical large database they're more appropriate when tree is used as an aid to parsing algebraic or similar expressionswhich are probably not too long anyway trees represented as arrays our code examples are based on the idea that tree' edges are represented by leftchild and rightchild references in each node howeverthere' completely different way to represent treewith an array in the array approachthe nodes are stored in an array and are not linked by references the position of the node in the array corresponds to its position in the tree the node at index is the rootthe node at index is the root' left childand so onprogressing from left to right along each level of the tree this is shown in figure every position in the treewhether it represents an existing node or notcorresponds to cell in the array adding node at given position in the tree means inserting the node into the equivalent cell in the array cells representing tree positions with no nodes are filled with or null with this schemea node' children and parent can be found by applying some simple arithmetic to the node' index number in the array if node' index number is indexthis node' left child is *index its right child is *index and its parent is (index-