Loading...
Loading...
Loading...
Print the values of the tree in inorder order, separated by single spaces. Inorder handles the left side first, then the node, then the right side.
Example 1
Input
1 2 3 4 5 null 6
Output
4 2 5 1 3 6
Prints 4 2 5 1 3 6.
Example 2
Input
5
Output
5
Try the problem first. Open one hint at a time.
Write the node's value between the two 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