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)
Answer:B
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)