Question: In a binary tree, what is the time complexity of finding the height of the tree?
Options:
Correct Answer: O(n)
Solution:
The time complexity of finding the height of a binary tree is O(n) because we may need to visit all nodes.