Created
June 3, 2020 09:06
-
-
Save bhaveshmunot1/75adfb4f50455726e0cdef5643fb6a9c to your computer and use it in GitHub Desktop.
Print Post Order Traversal of a binary tree using recursion.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_post_order_traversal(TreeNode *root) { | |
if (root == nullptr) { | |
return; | |
} | |
print_post_order_traversal(root->left); | |
print_post_order_traversal(root->right); | |
print(root->value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment