← 回題庫

卷別

資料結構與演算法

選擇

國立臺灣大學 2025 · 考試 · 第 10 題

(5 points) Select all the correct statement(s) from the following statements regarding binary trees and binary search trees.

  • (A)
    Every binary tree is a binary search tree.
  • (B)
    Every binary search tree on nn nodes has height O(log⁡n)O(\log n).
  • (C)
    In a binary search tree, we can find the next smallest element to a given element in O(1)O(1) time.
  • (D)
    Let A1,A2A_1, A_2, and A3A_3 be three sorted arrays of nn distinct real numbers. Constructing a balanced binary search tree of the set A1∪A2∪A3A_1 \cup A_2 \cup A_3 requires O(n)O(n) time.
  • (E)
    Let TT be a complete binary tree with nn nodes. Finding a path from the root of TT to a given vertex v∈Tv \in T using breadth-first search takes Ω(nlg⁡n)\Omega(n \lg n) time.

標準解析

AI 已複查