資料結構›Ch5 樹狀結構
第 10 題/共 48 題
◀ DS 10/48
10. Binary Tree、DFS、BFS、空間複雜度
#DS-05-010中Binary TreeDFSBFS空間複雜度

(單選)We now use several algorithms to traverse a binary tree. Assuming there are a total number of NN nodes, how many of the following statements about the worst-case space complexity are TRUE?

  • Using DFS to traverse a balanced binary tree takes O(N)O(N).
  • Using DFS to traverse a binary tree takes O(N)O(N).
  • Using BFS to traverse a balanced binary tree takes O(N)O(N).
  • Using BFS to traverse a binary tree takes O(N)O(N).
📄 台大112
跳轉到第題
▤完整推導請見《WH 資工筆記 · 資料結構》Ch5 樹狀結構
本章題號 · 1–20 / 48