Return the inorder traversal of a binary tree as a list of node values.
Constraints
Example
```python
# Example 1:
# Tree: 1
# \
# 2
# /
# 3
root = {"val": 1, "left": None, "right": {"val": 2, "left": {"val": 3, "left": None, "right": None}, "right": None}}
print(inorder_traversal(root)) # Output: [1, 3, 2]
# Example 2:
root = None
print(inorder_traversal(root)) # Output: []
```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints