notes consider the following example given the preorder and inorder traversal of binary tree draw the tree and write down its postorder traversal inorderzaqpyxcb preorderqazypcxb to obtain the binary tree take the first node in preorderit is root nodewe then search for this node in the inorder traversalall the nodes to the left of this node in the inorder traversal will be the part of the left sub-treeand all the nodes to the right of this node in the inorder traversal will be the part of the right sub-tree we then consider the next node in the preoderif it is part of the left sub-treethen we make it as left child of the roototherwise if it is part of the right sub-tree then we make it as part of right sub-tree this procedure is repeated recursively to get the tree shown below in figure figure unique binary tree constructed using the inorder and postorder the post order for this tree iszapxbcyq the following function counts the number of leaf node in binary tree int count(tnode *pif( =nullcount else if(( -> child =null&( ->rchild =null)count else count count( -> childcount( ->rchild)the following procedure swaps the left and the right child of every node of given binary tree void swaptree(tnode * lovely professional university