-->
当前位置:首页 > 题库

单选题:The space complexity of traversing a binary tree with $$N$$ node

Luz5年前 (2021-05-10)题库704
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