Task:
You are given the root of a binary tree. Return the values of the nodes when traversed inorder (left → root → right).
Input: root = [2, 1, 3]
Output: [1, 2, 3]
Explanation:
Visit the left child 1 Visit the root 2 Visit the right child 3
Input: root = [5, 3, 6, 2, 4, None, 7]
Output: [2, 3, 4, 5, 6, 7]
Input: root = []
Output: []
Input: root = [10]
Output: [10]
Accepted:
Submission: