Part 9 of 15 in Binary Trees  

Postorder traversal of Binary trees by animeshn

Problem statement

Given pointer to the root node of a binary tree of integers, write a function to print elements of the tree in its post-order traversal. Use cout to output the numbers.

Input

You need to write a function named "Postorder" that will take root of a binary tree of integers as argument.

Output

Your function should print all the elements in the binary tree in its post-order traversal. Separate the elements by a new line. For example:

1
2
3
4



To try out your code



Sign in

Sign up