now let us build the binary tree step node is the root of the general treeso it will also be the root of the binary tree step left child of node is the leftmost child of node in the general tree and right step child of node is the right sibling of the node in the general tree since node has no right sibling in the general treeit has no right child in the binary tree step now process node left child of is and its right child is (right sibling in general treestep step now process node left child of is (leftmost childand its right child is (right sibling in general treeb step now process node left child of is (leftmost childthere will be no right child of because it has no right sibling in the general tree step now process node there will be no left child of in the binary tree because has no left child in the general tree howeveri has right sibling jso it will be added step as the right child of step now process node left child of is (leftmost childthere will be no right child of because it has no right sibling in the general tree step step step step step step now process all the unprocessed nodes (efghkin the same fashionso the resultant binary tree can be given as follows traversing binary tree traversing binary tree is the process of visiting each node in the tree exactly once in systematic way unlike linear data structures in which the elements are traversed sequentiallytree is nonlinear data structure in which the elements can be traversed in many different ways there are different algorithms for tree traversals these algorithms differ in the order in which the nodes are visited in this sectionwe will discuss these algorithms pre-order traversal to traverse non-empty binary tree in pre-orderthe following operations are performed recursively at each node the algorithm works bya visiting the root nodeb traversing the left sub-treeand finally traversing the right sub-tree figure binary tree