- Data Structures
- Tree: Postorder Traversal
Complete the function in the editor below. It received parameter: a pointer to the root of a binary tree. It must print the values in the tree's postorder traversal as a single line of space-separated values.
Our test code passes the root node of a binary tree to the function.
Nodes in the tree
Print the tree's postorder traversal as a single line of space-separated values.
1 \ 2 \ 5 / \ 3 6 \ 4
4 3 6 5 2 1
The postorder traversal is shown.