单选题:The space complexity of traversing a binary tree with $$N$$ node
The space complexity of traversing a binary tree with $$N$$ nodes and height $$H$$ in levelorder (with the help of an auxiliary queue) is __. @[B](3)
A. $$O(H+N)$$
B. $$O(N)$$
C. $$O(H)$$
D. $$O(N+\log H)$$
A.$$O(H+N)$$
B.$$O(N)$$
C.$$O(H)$$
D.$$O(N+\log H)$$
答案:B
A. $$O(H+N)$$
B. $$O(N)$$
C. $$O(H)$$
D. $$O(N+\log H)$$
A.$$O(H+N)$$
B.$$O(N)$$
C.$$O(H)$$
D.$$O(N+\log H)$$
答案:B