trees figure worst-case binary tree implementation because binary tree node has at most two childrenwe can keep direct links to them the declaration of tree nodes is similar in structure to that for doubly linked listsin that node is structure consisting of the element information plus two pointers (left and rightto other nodes (see fig we could draw the binary trees using the rectangular boxes that are customary for linked listsbut trees are generally drawn as circles connected by linesbecause they are actually graphs we also do not explicitly draw nullptr links when referring to treesbecause every binary tree with nodes would require nullptr links binary trees have many important uses not associated with searching one of the principal uses of binary trees is in the area of compiler designwhich we will now explore an exampleexpression trees figure shows an example of an expression tree the leaves of an expression tree are operandssuch as constants or variable namesand the other nodes contain operators this particular tree happens to be binarybecause all the operators are binaryand although this is the simplest caseit is possible for nodes to have more than two children it is also possible for node to have only one childas is the case with the unary minus operator we can evaluate an expression treetby applying the operator at the root to the values struct binarynode object elementbinarynode *leftbinarynode *right}/the data in the node /left child /right child figure binary tree node class (pseudocode