Loading...
Loading...
Loading...
Print the values of the tree in postorder order, separated by single spaces. Postorder handles the left side, then the right side, then the node.
Example 1
Input
1 2 3 4 5 null 6
Output
4 5 2 6 3 1
Prints 4 5 2 6 3 1.
Example 2
Input
5
Output
5
Try the problem first. Open one hint at a time.
Write the node's value after both recursive calls.
Use one list that all calls add to.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor