Question: What is the space complexity of a recursive inorder traversal of a binary tree?
Options:
Correct Answer: O(log n)
Solution:
The space complexity is O(h), where h is the height of the tree. In the worst case of a skewed tree, this can be O(n), but for a balanced tree, it is O(log n).