Given the root of a binary tree, return its in-order traversal as an array of node values. In-order means you visit the left subtree first, then the current node, then the right subtree.
If the tree is empty, return an empty array.
Input / output
root: TreeNode (the JSON test fixture is a LeetCode-style level-order array, e.g. [1,null,2,3], using null for missing children)int[]The recursive solution is natural here, but can you also solve it iteratively using an explicit stack?