What is the time complexity of pre-order traversal in the iterative fashion?

Q & ACategory: Data StructureWhat is the time complexity of pre-order traversal in the iterative fashion?
Admin Staff asked 4 years ago

What is the time complexity of pre-order traversal in the iterative fashion?
a) O(1)
b) O(n)
c) O(logn)
d) O(nlogn)

1 Answers
Admin Staff answered 4 years ago

b) O(n)