diff --git a/Binary Tree/BinaryTreeTraversal.cpp b/Binary Tree/BinaryTreeTraversal.cpp index a47c91e..8ac1ffb 100644 --- a/Binary Tree/BinaryTreeTraversal.cpp +++ b/Binary Tree/BinaryTreeTraversal.cpp @@ -18,6 +18,16 @@ void inorder(struct node *root) { inorder(root->right); } } + +void postorder(struct node *root){ + if(root==NULL) + return; + postorder(root->left); + postorder(root->right); + cout<data<<" "; +} + + struct node* insertNode(struct node* node, int val) { if (node == NULL) return createNode(val); if (val < node->data)