30:00
Given the root of a binary tree, return the inorder traversal of its node values: the left subtree, then the node itself, then the right subtree.
The number of nodes in the tree is in the range [0,100][0, 100][0,100].
−100≤Node.val≤100-100 \leq \text{Node.val} \leq 100−100≤Node.val≤100
Run code to see results.
Start with an empty result list and an empty stack. The tree has 3 nodes.
stack
empty
size 0
res = []
Given the root of a binary tree, return its node values in inorder order: for every node, list its whole left subtree, then the node, then its whole right subtree. The tree has at most 100 nodes and may be empty.