Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhaveshmunot1/75adfb4f50455726e0cdef5643fb6a9c to your computer and use it in GitHub Desktop.
Save bhaveshmunot1/75adfb4f50455726e0cdef5643fb6a9c to your computer and use it in GitHub Desktop.
Print Post Order Traversal of a binary tree using recursion.
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