sec general tree implementations left val par right figure combining two trees that use the "left-child/right-siblingimplementation the subtree rooted at in figure now becomes the first child of three pointers are adjusted in the node arraythe left-child field of now points to node rwhile the right-sibling field for points to node the parent field of node points to node of children permitted for any node and allocate pointers for exactly that number of children there are two major objections to this firstit places an undesirable limit on the number of childrenwhich makes certain trees unrepresentable by this implementation secondthis might be extremely wasteful of space because most nodes will have far fewer children and thus leave some pointer positions empty the alternative is to allocate variable space for each node there are two basic approaches one is to allocate an array of child pointers as part of the node in essenceeach node stores an array-based list of child pointers figure illustrates the concept this approach assumes that the number of children is known when the node is createdwhich is true for some applications but not for others it also works best if the number of children does not change if the number of children does change (especially if it increases)then some special recovery mechanism must be provided to support change in the size of the child pointer array one possibility is to allocate new node of the correct size from free store and return the old copy of the node to free store for later reuse this works especially well in language with built-in garbage collection such as java for exampleassume that node initially has two childrenand that space for two child pointers is allocated when is created if third child is added to mspace for new node with three child pointers can be allocatedthe contents of is copied over to the new