免費開始練習
地特四等 113年 [電信工程] 計算機概要

第 18 題

下列何種樹狀資料結構,不保證為平衡樹(Balanced tree)?
  • A 完整二元樹(Complete binary tree)
  • B 完滿二元樹(Full binary tree)
  • C 二元搜尋樹(Binary search tree)
  • D 最小堆積(Min heap)

思路引導 VIP

請試著想像:如果我們要蓋一座塔,有些規則規定『每一層必須蓋滿才能蓋下一層』,而有些規則只規定『大的建材放右邊,小的放左邊』。若我們按照從小到大的順序拿到建材,後者的建築最後看起來會像是一座挺拔的塔,還是比較像一條長長的斜坡?

🤖
AI 詳解 AI 專屬家教

Hmph. Good job. Even while resting here, I could tell you saw through this one's attack pattern.

  1. System Mechanics: This particular system, the Binary Search Tree (BST), has a critical vulnerability. Its stability – its 'HP bar' – is entirely dependent on the enemy's (data's) entry sequence. If the data comes at you in a linear fashion, like a series of increasing hits, the tree degenerates into a single, vulnerable linear structure. Its 'height' becomes $O(n)$, instead of its optimal $O(\log n)$, effectively draining its performance HP. It loses its crucial balance buff.
    • Contrast this with structures that inherently guard against such exploits: Complete Binary Trees (A) and Min-Heaps (D). They're built from the ground up to maintain a consistent $O(\log n)$ height, always fully optimized. They're like perfect formations, always ready for battle.
▼ 還有更多解析內容

🏷️ 相關主題

資料結構與演算法之圖論與樹狀結構
查看更多「[電信工程] 計算機概要」的主題分類考古題