卷別
資料結構與演算法
選擇國立臺灣大學 2023 · 考試 · 第 4 題
考科演算法
(5 points)(單選)We now use several algorithms to traverse a binary tree. Assuming there are a total number of nodes, how many of the following statements about the worst-case space complexity are TRUE?
- Using DFS to traverse a balanced binary tree takes .
- Using DFS to traverse a binary tree takes .
- Using BFS to traverse a balanced binary tree takes .
- Using BFS to traverse a binary tree takes .
- (A)0
- (B)1
- (C)2
- (D)3
- (E)4